This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients
Date 2001-08-23.03:18:07
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Docs are needed for the new handling of overflow of
short int operations. Would you mind adding these?

This affects x+y, x-y, x*y, x/y, x%y, divmod(x, y),
x**y, pow(x, y[, z]), and -x.

The rules are as follows:

- If an int result overflows, the (new) OverflowWarning
warning is issued (with a message argument indicating
the operation, e.g. "integer addition").

- This warning is ignored by default.

- The warning can be controlled like all warnings, via
the -W command line option (use
-Wdefault::OverflowWarning to cause the warning to be
issued) or via the warnings.filterwarnings() call.

- Unless the warning is turned into an error, the
result is recomputed after converting the arguments to
long ints.

- If the warning is turned into an error, OverflowError
is substituted (for backwards compatibility).

PS. Is it documented yet that
int-to-the-negative-int-power now returns a float?

Thanks!
History
Date User Action Args
2007-08-23 13:55:57adminlinkissue454446 messages
2007-08-23 13:55:57admincreate