[Python-checkins] r63049 - python/trunk/Doc/library/stdtypes.rst

georg.brandl python-checkins at python.org
Sun May 11 11:06:30 CEST 2008


Author: georg.brandl
Date: Sun May 11 11:06:30 2008
New Revision: 63049

Log:
#1153769: document PEP 237 changes to string formatting.


Modified:
   python/trunk/Doc/library/stdtypes.rst

Modified: python/trunk/Doc/library/stdtypes.rst
==============================================================================
--- python/trunk/Doc/library/stdtypes.rst	(original)
+++ python/trunk/Doc/library/stdtypes.rst	Sun May 11 11:06:30 2008
@@ -1185,7 +1185,7 @@
 +---------+---------------------------------------------------------------------+
 
 A length modifier (``h``, ``l``, or ``L``) may be present, but is ignored as it
-is not necessary for Python.
+is not necessary for Python -- so e.g. ``%ld`` is identical to ``%d``.
 
 The conversion types are:
 
@@ -1196,13 +1196,13 @@
 +------------+-----------------------------------------------------+-------+
 | ``'i'``    | Signed integer decimal.                             |       |
 +------------+-----------------------------------------------------+-------+
-| ``'o'``    | Unsigned octal.                                     | \(1)  |
+| ``'o'``    | Signed octal value.                                 | \(1)  |
 +------------+-----------------------------------------------------+-------+
-| ``'u'``    | Unsigned decimal.                                   |       |
+| ``'u'``    | Obselete type -- it is identical to ``'d'``.        | \(7)  |
 +------------+-----------------------------------------------------+-------+
-| ``'x'``    | Unsigned hexadecimal (lowercase).                   | \(2)  |
+| ``'x'``    | Signed hexadecimal (lowercase).                     | \(2)  |
 +------------+-----------------------------------------------------+-------+
-| ``'X'``    | Unsigned hexadecimal (uppercase).                   | \(2)  |
+| ``'X'``    | Signed hexadecimal (uppercase).                     | \(2)  |
 +------------+-----------------------------------------------------+-------+
 | ``'e'``    | Floating point exponential format (lowercase).      | \(3)  |
 +------------+-----------------------------------------------------+-------+
@@ -1271,6 +1271,9 @@
 
    The precision determines the maximal number of characters used.
 
+(7)
+   See :pep:`237`.
+
 Since Python strings have an explicit length, ``%s`` conversions do not assume
 that ``'\0'`` is the end of the string.
 


More information about the Python-checkins mailing list