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/2002-November/030547.html below:

[Python-Dev] int/long FutureWarning

[Python-Dev] int/long FutureWarningMartin v. Löwis martin@v.loewis.de
29 Nov 2002 00:41:40 +0100
"Mark Hammond" <mhammond@skippinet.com.au> writes:

> Except, on the flip-side, let's say I am *happy* for such contants to become
> longs.  I really don't want to see the warning for every hex literal once I
> understand the impact.

Reducing the warnings to one warning per module might be reasonable.

To silence the warning, you should really add "L" suffixes to all
those literals - or we could provide a future statement, where you
indicate that you want those literals to become positive longs *now*;
you'ld need to add this statement once per module.

However, when you do that, I believe you will get OverflowErrors
once you pass the constants to your C API.

> So, maybe we simply need finer-grained warnings - such as in
> PyArg_ParseTuple, and any other places where the impact will
> actually be felt.

Feel free to propose specific patches. I believe this specific
strategy is unimplementable: When the value goes to ParseTuple, it is
not known anymore whether the integer literal was hex (or whether
there was any integer literal at all).

Regards,
Martin



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