Remove author's email addresses.

Mention %X (same treatment as %x).

Insert new stage B0, which gives warnings about e.g. 0xffffffff
without semantic changes.  Move the proposed deployment of subsequent
stages up by one minor revision.
This commit is contained in:
Guido van Rossum 2002-08-11 04:05:13 +00:00
parent 84b2de1d45
commit 5962f34a59
1 changed files with 20 additions and 12 deletions

View File

@ -1,7 +1,7 @@
PEP: 237
Title: Unifying Long Integers and Integers
Version: $Revision$
Author: pep@zadka.site.co.il (Moshe Zadka), guido@python.org (Guido van Rossum)
Author: Moshe Zadka, Guido van Rossum
Status: Draft
Type: Standards Track
Created: 11-Mar-2001
@ -104,15 +104,15 @@ Incompatibilities
negative values; for example 0xffffffff == -1 on a 32-bit
machine. This will be changed to equal 0xffffffffL (2**32-1).
- Currently, the '%u', '%x' and '%o' string formatting operators
and the hex() and oct() built-in functions behave differently
for negative numbers: negative short ints are formatted as
unsigned C long, while negative long ints are formatted with a
minus sign. This will be changed to use the long int semantics
in all cases (but without the trailing 'L' that currently
distinguishes the output of hex() and oct() for long ints).
Note that this means that '%u' becomes an alias for '%d'. It
will eventually be removed.
- Currently, the '%u', '%x', '%X' and '%o' string formatting
operators and the hex() and oct() built-in functions behave
differently for negative numbers: negative short ints are
formatted as unsigned C long, while negative long ints are
formatted with a minus sign. This will be changed to use the
long int semantics in all cases (but without the trailing 'L'
that currently distinguishes the output of hex() and oct() for
long ints). Note that this means that '%u' becomes an alias for
'%d'. It will eventually be removed.
- Currently, repr() of a long int returns a string ending in 'L'
while repr() of a short int doesn't. The 'L' will be dropped.
@ -199,6 +199,12 @@ Transition
Phase B will be implemented starting with Python 2.3. Envisioned
stages of phase B:
B0. Warnings are enabled about operations that will change their
numeric outcome in stage B1, in particular hex() and oct(),
'%u', '%x', '%X' and '%o', hex and oct literals in the
(inclusive) range [sys.maxint+1, sys.maxint*2+1], and left
shifts losing bits; but not repr() of a long.
B1. The remaining semantic differences are addressed. Operations
that give different results than before will issue a warning
that is on by default. A warning for the use of long literals
@ -215,9 +221,11 @@ Transition
We propose the following timeline:
B1. Python 2.3.
B0. Python 2.3.
B2. Python 2.4.
B1. Python 2.4.
B2. Python 2.5.
B3. The rest of the Python 2.x line.