This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author davidchambers
Recipients davidchambers, docs@python
Date 2013-10-12.22:27:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1381616869.75.0.196962613989.issue19238@psf.upfronthosting.co.za>
In-reply-to
Content
From http://docs.python.org/3/library/string.html#formatspec:

> The presence of a fill character is signaled by the character
> following it, which must be one of the alignment options. If the
> second character of format_spec is not a valid alignment option,
> then it is assumed that both the fill character and the alignment
> option are absent.

The fact that the second character in the format_spec is not an
alignment option is not sufficient to declare that the alignment
option is absent: the alignment option may be the first character
in the format_spec. For example:

    >>> '{:^10}'.format(42)
    '    42    '

I suggest the following wording:

The presence of a fill character is signaled by the character
following it, which must be one of the alignment options. Unless
the second character of format_spec is a valid alignment option,
the fill character is assumed to be absent.
History
Date User Action Args
2013-10-12 22:27:49davidchamberssetrecipients: + davidchambers, docs@python
2013-10-12 22:27:49davidchamberssetmessageid: <1381616869.75.0.196962613989.issue19238@psf.upfronthosting.co.za>
2013-10-12 22:27:49davidchamberslinkissue19238 messages
2013-10-12 22:27:49davidchamberscreate