Serhiy Storchaka added the comment:

What about PyLong_AsSsize_t(), PyLong_AsUnsignedLong(), and PyLong_AsSize_t()? 
They are ignore __int__().

PyLong_AsVoidPtr() calls PyLong_AsLong(), PyLong_AsUnsignedLong(), 
PyLong_AsLongLong(), or PyLong_AsUnsignedLongLong() (depending on pointer's 
size and it's sign) and therefore can call or not call __int__, can raise or 
not raise TypeError on non-int subclasses with defined __int__().

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17576>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to