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!
|