Author erik.bray
Recipients erik.bray
Date 2017-12-28.10:19:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1514456365.15.0.213398074469.issue32438@psf.upfronthosting.co.za>
In-reply-to
Content
Per Serhiy's comment in this thread https://mail.python.org/pipermail/python-ideas/2017-December/048413.html (which I agree with), several of the PyLong_ functions have behavior carried over from Python 2 of calling __int__ on their arguments if the input is not a PyLongObject:

PyLong_AsLong
PyLong_AsLongAndOverflow
PyLong_AsLongLong
PyLong_AsLongLongAndOverflow
PyLong_AsUnsignedLongMask
PyLong_AsUnsignedLongLongMask

This behavior should probably be deprecated, and eventually removed.  Interfaces that should accept generic number-like objects should use the PyNumber API instead.
History
Date User Action Args
2017-12-28 10:19:25erik.braysetrecipients: + erik.bray
2017-12-28 10:19:25erik.braysetmessageid: <1514456365.15.0.213398074469.issue32438@psf.upfronthosting.co.za>
2017-12-28 10:19:25erik.braylinkissue32438 messages
2017-12-28 10:19:24erik.braycreate