Re: [Python-Dev] negative PyLong integer - unsigned integer, TypeError or OverflowError?

2009-02-07 Thread Mark Dickinson
On Fri, Feb 6, 2009 at 11:38 PM, Lisandro Dalcin dalc...@gmail.com wrote: Done, http://bugs.python.org/issue5175 Thank you! Mark ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

[Python-Dev] negative PyLong integer - unsigned integer, TypeError or OverflowError?

2009-02-06 Thread Lisandro Dalcin
While hacking on Cython to make it recognize 'size_t' as a pre-defined C integral type, I've found somethig that seems to be (pretty small) inconsistency. At Objects/longobject.c, you should see that in almost all cases OverflowError is raised when a unsigned integral is requested from a negative

Re: [Python-Dev] negative PyLong integer - unsigned integer, TypeError or OverflowError?

2009-02-06 Thread Mark Dickinson
On Fri, Feb 6, 2009 at 9:04 PM, Lisandro Dalcin dalc...@gmail.com wrote: At Objects/longobject.c, you should see that in almost all cases OverflowError is raised when a unsigned integral is requested from a negative PyLong. However, See this one: [...] if (!is_signed) {

Re: [Python-Dev] negative PyLong integer - unsigned integer, TypeError or OverflowError?

2009-02-06 Thread Lisandro Dalcin
Done, http://bugs.python.org/issue5175 On Fri, Feb 6, 2009 at 6:25 PM, Mark Dickinson dicki...@gmail.com wrote: On Fri, Feb 6, 2009 at 9:04 PM, Lisandro Dalcin dalc...@gmail.com wrote: At Objects/longobject.c, you should see that in almost all cases OverflowError is raised when a unsigned