New submission from Mark Dickinson <dicki...@gmail.com>: The following C-API functions:
PyLong_AsLongAndOverflow PyLong_AsUnsignedLongMask PyLong_AsLongLong PyLong_AsUnsignedLongLongMask call nb_int for inputs that don't satisfy PyLong_Check. They thus accept floats, Decimal instances, etc. They should probably call nb_index instead (or perhaps accept only instances of int). The uses of these functions within the Python source should be checked, to see what consequences (if any) this change would have for Python semantics; it's possible that some of these consequences would fall under the moratorium (PEP 3003). In any case, this change probably requires a 1-release deprecation period. ---------- components: Interpreter Core messages: 96670 nosy: mark.dickinson severity: normal status: open title: PyLong_As* methods should not call nb_int. versions: Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7550> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com