Message276415
For example:
>>> '{:04}'.format('abc')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: '=' alignment not allowed in string format specifier
There is no any '=' in the format string.
>>> '{: }'.format('abc')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: Sign not allowed in string format specifier
There is no any sign ('+' or '-') in the format string.
There also an inconsistency between the wording of "something not allowed in string format specifier" and:
>>> '{:x}'.format('abc')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: Unknown format code 'x' for object of type 'str'
>>> '{:xx}'.format('abc')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: Invalid format specifier |
|
Date |
User |
Action |
Args |
2016-09-14 11:12:35 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, vstinner, ezio.melotti |
2016-09-14 11:12:35 | serhiy.storchaka | set | messageid: <1473851555.69.0.998405869153.issue28146@psf.upfronthosting.co.za> |
2016-09-14 11:12:35 | serhiy.storchaka | link | issue28146 messages |
2016-09-14 11:12:35 | serhiy.storchaka | create | |
|