[Python-checkins] python/dist/src/Doc/ref ref2.tex,1.49,1.50

gvanrossum at users.sourceforge.net gvanrossum at users.sourceforge.net
Sat Nov 29 18:52:14 EST 2003


Update of /cvsroot/python/python/dist/src/Doc/ref
In directory sc8-pr-cvs1:/tmp/cvs-serv28240/Doc/ref

Modified Files:
	ref2.tex 
Log Message:
- Removed FutureWarnings related to hex/oct literals and conversions
  and left shifts.  (Thanks to Kalle Svensson for SF patch 849227.)
  This addresses most of the remaining semantic changes promised by
  PEP 237, except for repr() of a long, which still shows the trailing
  'L'.  The PEP appears to promise warnings for operations that
  changed semantics compared to Python 2.3, but this is not
  implemented; we've suffered through enough warnings related to
  hex/oct literals and I think it's best to be silent now.


Index: ref2.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref2.tex,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** ref2.tex	6 Sep 2003 03:50:07 -0000	1.49
--- ref2.tex	29 Nov 2003 23:52:12 -0000	1.50
***************
*** 581,595 ****
  digit \character{1}.
  
! Plain integer decimal literals that are above the largest representable
! plain integer (e.g., 2147483647 when using 32-bit arithmetic) are accepted
! as if they were long integers instead.  Octal and hexadecimal literals
! behave similarly, but when in the range just above the largest representable
! plain integer but below the largest unsigned 32-bit number (on a machine
! using 32-bit arithmetic), 4294967296, they are taken as the negative plain
! integer obtained by subtracting 4294967296 from their unsigned value.  There
! is no limit for long integer literals apart from what can be stored in
! available memory.  For example, 0xdeadbeef is taken, on a 32-bit machine,
! as the value -559038737, while 0xdeadbeeffeed is taken as the value
! 244837814107885L.
  
  Some examples of plain integer literals (first row) and long integer
--- 581,593 ----
  digit \character{1}.
  
! Plain integer literals that are above the largest representable plain
! integer (e.g., 2147483647 when using 32-bit arithmetic) are accepted
! as if they were long integers instead.\footnote{In versions of Python
! prior to 2.4, octal and hexadecimal literals in the range just above
! the largest representable plain integer but below the largest unsigned
! 32-bit number (on a machine using 32-bit arithmetic), 4294967296, were
! taken as the negative plain integer obtained by subtracting 4294967296
! from their unsigned value.}  There is no limit for long integer
! literals apart from what can be stored in available memory.
  
  Some examples of plain integer literals (first row) and long integer
***************
*** 597,603 ****
  
  \begin{verbatim}
! 7     2147483647                        0177    0x80000000
  3L    79228162514264337593543950336L    0377L   0x100000000L
!       79228162514264337593543950336             0xdeadbeeffeed						    
  \end{verbatim}
  
--- 595,601 ----
  
  \begin{verbatim}
! 7     2147483647                        0177
  3L    79228162514264337593543950336L    0377L   0x100000000L
!       79228162514264337593543950336             0xdeadbeef						    
  \end{verbatim}
  





More information about the Python-checkins mailing list