New submission from Erik Bray <erik.m.b...@gmail.com>: 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. ---------- components: Interpreter Core messages: 309119 nosy: erik.bray priority: normal severity: normal status: open title: PyLong_ API cleanup type: behavior _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32438> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com