[Python-Dev] PySequence_Check but no __len__
there is a case in the Python API where I am not sure what to do:
If an object defines __getitem__() only but no __len__(),
then PySequence_Check() already is true and does not care.
So if I define no __len__, it simply fails. Is this intended?
I was mislead and thought this was the unlimited case, but
it seems still to be true that sequences are always finite.
Can someone please enlighten me?
Christian Tismer-Sperling :^) tismer at stackless.com
Software Consulting : http://www.stackless.com/
Karl-Liebknecht-Str. 121 : http://pyside.org
14482 Potsdam : GPG key -> 0xE7301150FB7BEE0E
phone +49 173 24 18 776 fax +49 (30) 700143-0023
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 522 bytes
Desc: OpenPGP digital signature