[docs] [issue8556] Confusing string formatting examples
Jeff McNeil
report at bugs.python.org
Wed Apr 28 06:57:29 CEST 2010
New submission from Jeff McNeil <jeff at jmcneil.net>:
I was going through the string formatting examples this evening and noticed this:
print '%(language)s has %(#)03d quote types.' % \
{'language': "Python", "#": 2}
The example uses a '#' as a map key. This is somewhat misleading as if we had simply left the parenthesis off, the '#' would have been interpreted as an alternate conversion flag. Should be updated to use a more verbose (and less confusing) dictionary key.
----------
assignee: docs at python
components: Documentation
files: stdtypes.rst.2.6.5.patch
keywords: patch
messages: 104410
nosy: docs at python, mcjeff
priority: normal
severity: normal
status: open
title: Confusing string formatting examples
versions: Python 2.6
Added file: http://bugs.python.org/file17115/stdtypes.rst.2.6.5.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8556>
_______________________________________
More information about the docs
mailing list