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 vstinner
Recipients Gavin.Andresen, davide.rizzo, eric.smith, ezio.melotti, python-dev, vstinner
Date 2014-05-19.07:48:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1400485687.61.0.785138616737.issue12546@psf.upfronthosting.co.za>
In-reply-to
Content
I don't understand why it works with "<", "=" or ">":

>>> "{0:\x00<6d}".format(123)
'123\x00\x00\x00'

But not without:

>>> "{0:\x006d}".format(123)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Invalid format specifier

Compare it to:

>>> "{0:6d}".format(123)
'   123'
>>> "{0:06d}".format(123)
'000123'
History
Date User Action Args
2014-05-19 07:48:07vstinnersetrecipients: + vstinner, eric.smith, ezio.melotti, davide.rizzo, python-dev, Gavin.Andresen
2014-05-19 07:48:07vstinnersetmessageid: <1400485687.61.0.785138616737.issue12546@psf.upfronthosting.co.za>
2014-05-19 07:48:07vstinnerlinkissue12546 messages
2014-05-19 07:48:06vstinnercreate