S
Sebastian Tusk
PySequence_Check returns 1 for instances of a simple class. Even if this
class doesn't implement __len__ and __getitem__.
The following code thus fails with an exception for classes that doesn't
implement the sequence protocol.
if (PySequence_Check( instance )) {
int size = PySequence_Size( instance );
}
Is this intended behaviour or a bug?
Regards,
Sebastian
class doesn't implement __len__ and __getitem__.
The following code thus fails with an exception for classes that doesn't
implement the sequence protocol.
if (PySequence_Check( instance )) {
int size = PySequence_Size( instance );
}
Is this intended behaviour or a bug?
Regards,
Sebastian