[issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError?

Mark Dickinson report at bugs.python.org
Sun Feb 8 14:00:13 CET 2009


Mark Dickinson <dickinsm at gmail.com> added the comment:

Looks like this was changed in a checkin by Tim Peters in r21099;  before 
r21099, PyLong_AsUnsignedLongLong raised OverflowError for negative 
numbers.  After the checkin, it raised TypeError.  I suspect the change 
was inadvertent.

Tim, any comments?

Lisandro, do you have any interest in contributing a patch for this?  The 
patch should change the exception type, fix the docs, add a test or two 
for the fixed behaviour of PyLong_AsUnsignedLongLong to 
Modules/_testcapimodule.c, and fix the test_struct test for the 'Q' format 
code.

----------
nosy: +tim_one

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


More information about the Python-bugs-list mailing list