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