Datatype to allow empty Python lists to be represented without defaulting to a datatype. More...
#include <dictionary.h>
Public Member Functions | |
| bool | operator== (const EmptyList &) const =default |
Datatype to allow empty Python lists to be represented without defaulting to a datatype.
Python lists are converted to std::vector, which requires chosing a data type. For non-empty types the type can be inferred from the elements, but this is not possible for empty lists. Here, only the C++ level knows what type would be expected. To avoid type collisions, the Cython interface represents empty lists as EmptyList which can be cast to vectors of any element data type at the C++ level.
|
default |