homepage

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 bignose
Recipients bignose
Date 2016年08月16日.04:35:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1471322118.97.0.225723730885.issue27772@psf.upfronthosting.co.za>
In-reply-to
Content
When using a format specifier with leading zero, the format spec mini-language (as documented at https://docs.python.org/3/library/string.html#format-specification-mini-language>) says:
> '=' [...] becomes the default when ‘0’ immediately precedes the field width.
When the ‘=’ option is only implied, the error message "ValueError: '=' alignment not allowed in string format specifier" becomes surprising and incomprehensible to someone who does not know that implied behaviour.
In issue 15560, Terry Reedy says:
> If the spec string is still available, it could be searched and the message adjusted if '=' is not present. That proposal should be a new issue if someone wants to push it.
This issue raises that proposal.
The error message should be changed so that:
* It makes sense whether or not the ‘=’ option is explicit in the format specifier.
Or:
* Different messages are produced when the ‘=’ option is explicit versus when it is implicit.
I think the former option is better, but either will satisfy this request.
History
Date User Action Args
2016年08月16日 04:35:19bignosesetrecipients: + bignose
2016年08月16日 04:35:18bignosesetmessageid: <1471322118.97.0.225723730885.issue27772@psf.upfronthosting.co.za>
2016年08月16日 04:35:18bignoselinkissue27772 messages
2016年08月16日 04:35:18bignosecreate

AltStyle によって変換されたページ (->オリジナル) /