A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-February/085925.html below:

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

[Python-Dev] negative PyLong integer -> unsigned integer, TypeError or OverflowError?Mark Dickinson dickinsm at gmail.com
Fri Feb 6 22:25:26 CET 2009
On Fri, Feb 6, 2009 at 9:04 PM, Lisandro Dalcin <dalcinl at 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) {
>                       PyErr_SetString(PyExc_TypeError,
>                               "can't convert negative long to unsigned");
>                       return -1;
>               }

I agree that TypeError seems wrong here.

Please could you file a bug report at bugs.python.org?

Mark
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4