[Python-checkins] python/nondist/peps pep-0240.txt,1.6,1.7

goodger@users.sourceforge.net goodger@users.sourceforge.net
Fri, 17 Jan 2003 16:59:08 -0800


Update of /cvsroot/python/python/nondist/peps
In directory sc8-pr-cvs1:/tmp/cvs-serv11194/python/nondist/peps

Modified Files:
	pep-0240.txt 
Log Message:
Updates from Christopher Craig.

Index: pep-0240.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0240.txt,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** pep-0240.txt	20 Sep 2002 14:10:52 -0000	1.6
--- pep-0240.txt	18 Jan 2003 00:59:04 -0000	1.7
***************
*** 42,49 ****
      mentioned above.  The following migration is suggested:
  
!     1. "from __future__ import rational_literals" will cause all such
!        literals to be treated as rational numbers.
  
!     2. Python 2.2 will have a warning, turned off by default, about
         such literals in the absence of a __future__ statement.  The
         warning message will contain information about the __future__
--- 42,50 ----
      mentioned above.  The following migration is suggested:
  
!     1. The next Python after approval will allow 
!        "from __future__ import rational_literals" 
!        to cause all such literals to be treated as rational numbers.
  
!     2. Python 3.0 will have a warning, turned on by default, about
         such literals in the absence of a __future__ statement.  The
         warning message will contain information about the __future__
***************
*** 51,55 ****
         they should be suffixed with "e0".
  
!     3. Python 2.3 will have the warning turned on by default.  This
         warning will stay in place for 24 months, at which time the
         literals will be rationals and the warning will be removed.
--- 52,56 ----
         they should be suffixed with "e0".
  
!     3. Python 3.1 will have the warning turned off by default.  This
         warning will stay in place for 24 months, at which time the
         literals will be rationals and the warning will be removed.
***************
*** 61,64 ****
--- 62,71 ----
      (Relax, I'm not taking floats away, I'm just adding two more characters.
      1e0 will still be a float)
+ 
+     Rationals must present themselves as a decimal float or they will be
+     horrible for users expecting decimals (i.e. str(.5) should return '.5' and
+     not '1/2').  This means that many rationals must be truncated at some 
+     point, which gives us a new loss of precision.
+