summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-10-17 09:19:03 (GMT)
committerGeorg Brandl <georg@python.org>2010-10-17 09:19:03 (GMT)
commitedc9e7ff179250f3e648fa04e8510308cd21e243 (patch)
tree29bd83d719ff669d2d6f964af7134893d4e76c77 /Doc
parent20f11fe43c47b68c8b9dd6539d2d40b66c9957f9 (diff)
downloadcpython-edc9e7ff179250f3e648fa04e8510308cd21e243.zip
cpython-edc9e7ff179250f3e648fa04e8510308cd21e243.tar.gz
cpython-edc9e7ff179250f3e648fa04e8510308cd21e243.tar.bz2
#8556: use less confusing mapping key in example.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/stdtypes.rst5
1 files changed, 2 insertions, 3 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 2232b66..ec4f9b8 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -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