[issue3729] SystemError on calling len() if __len__() doesn't return an int

Amaury Forgeot d'Arc report at bugs.python.org
Fri Aug 29 17:15:28 CEST 2008


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

What about using PyNumber_AsSsize_t? it uses PyNumber_Index to accept
integral-like types, and refuses floats.

----------
nosy: +amaury.forgeotdarc

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3729>
_______________________________________


More information about the Python-bugs-list mailing list