[Python-checkins] CVS: python/dist/src/Misc NEWS,1.82,1.83

Tim Peters python-dev@python.org
Thu, 30 Nov 2000 23:59:38 -0800


Update of /cvsroot/python/python/dist/src/Misc
In directory slayer.i.sourceforge.net:/tmp/cvs-serv29841/python/dist/src/misc

Modified Files:
	NEWS 
Log Message:
Made the description of %[udxXo] formats of negative longs in 2.1 more accurate.
I suggested to Guido that %u be deprecated (it seems useless in Python to me).


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.82
retrieving revision 1.83
diff -C2 -r1.82 -r1.83
*** NEWS	2000/11/30 05:22:43	1.82
--- NEWS	2000/12/01 07:59:35	1.83
***************
*** 4,8 ****
  Core language, builtins, and interpreter
  
! - %[duxXo] formats of negative Python longs now produce a sign
    character.  In 1.6 and earlier, they never produced a sign,
    and raised an error if the value of the long was too large
--- 4,8 ----
  Core language, builtins, and interpreter
  
! - %[xXo] formats of negative Python longs now produce a sign
    character.  In 1.6 and earlier, they never produced a sign,
    and raised an error if the value of the long was too large
***************
*** 13,20 ****
  
    >>> "%x" % -0x42L
!   '-42'  # in 2.1
    'ffffffbe' # in 2.0 and before, on 32-bit machines
    >>> hex(-0x42L)
    '-0x42L'   # in all versions of Python
  
  
--- 13,30 ----
  
    >>> "%x" % -0x42L
!   '-42'      # in 2.1
    'ffffffbe' # in 2.0 and before, on 32-bit machines
    >>> hex(-0x42L)
    '-0x42L'   # in all versions of Python
+ 
+   The behavior of %d formats for negative Python longs remains
+   the same as in 2.0 (although in 1.6 and before, they raised
+   an error if the long didn't fit in a Python int).
+ 
+   %u formats don't make sense for Python longs, but are allowed
+   and treated the same as %d in 2.1.  In 2.0, a negative long
+   formatted via %u produced a sign if and only if too large to
+   fit in an int.  In 1.6 and earlier, a negative long formatted
+   via %u raised an error if it was too big to fit in an int.