]> granicus.if.org Git - python/commitdiff
#8556: use less confusing mapping key in example.
authorGeorg Brandl <georg@python.org>
Sun, 17 Oct 2010 09:19:03 +0000 (09:19 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 17 Oct 2010 09:19:03 +0000 (09:19 +0000)
Doc/library/stdtypes.rst

index 2232b66c0ceb41ae80a28db6c283279a898bf9a1..ec4f9b893a6d9838130bc7cf09320e6021ea0751 100644 (file)
@@ -1414,9 +1414,8 @@ formats in the string *must* include a parenthesised mapping key into that
 dictionary inserted immediately after the ``'%'`` character. The mapping key
 selects the value to be formatted from the mapping.  For example:
 
-
-   >>> print('%(language)s has %(#)03d quote types.' % \
-   ...       {'language': "Python", "#": 2})
+   >>> print('%(language)s has %(number)03d quote types.' %
+   ...       {'language': "Python", "number": 2})
    Python has 002 quote types.
 
 In this case no ``*`` specifiers may occur in a format (since they require a