classification
Title: Docs: incollect example: "fill" and "align"
Type: Stage:
Components: Documentation Versions: Python 3.1, Python 3.2, Python 3.3, Python 2.7, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Urago.Keisuke, docs@python, georg.brandl
Priority: normal Keywords:

Created on 2011-02-07 04:41 by Urago.Keisuke, last changed 2011-02-07 12:11 by georg.brandl. This issue is now closed.

Messages (2)
msg128099 - (view) Author: Urago Keisuke (Urago.Keisuke) Date: 2011-02-07 04:41
"Nesting arguments and more complex examples"
at http://docs.python.org/library/string.html#format-examples

Below example code is no errors:
>>> for align, text in zip('<^>', ['left', 'center', 'right']):
...     '{0:{align}{fill}16}'.format(text, fill=align, align=align)

I think meaning is as follows:
...     '{0:{fill}{align}16}'.format(text, fill=align, align=align)
msg128107 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2011-02-07 12:11
Thanks, fixed in r88364.
History
Date User Action Args
2011-02-07 12:11:07georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg128107

resolution: fixed
2011-02-07 04:41:27Urago.Keisukecreate