mirror of https://github.com/python/cpython
#8556: use less confusing mapping key in example.
This commit is contained in:
parent
20f11fe43c
commit
edc9e7ff17
|
@ -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
|
dictionary inserted immediately after the ``'%'`` character. The mapping key
|
||||||
selects the value to be formatted from the mapping. For example:
|
selects the value to be formatted from the mapping. For example:
|
||||||
|
|
||||||
|
>>> print('%(language)s has %(number)03d quote types.' %
|
||||||
>>> print('%(language)s has %(#)03d quote types.' % \
|
... {'language': "Python", "number": 2})
|
||||||
... {'language': "Python", "#": 2})
|
|
||||||
Python has 002 quote types.
|
Python has 002 quote types.
|
||||||
|
|
||||||
In this case no ``*`` specifiers may occur in a format (since they require a
|
In this case no ``*`` specifiers may occur in a format (since they require a
|
||||||
|
|
Loading…
Reference in New Issue