STINNER Victor added the comment:
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'
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue12546>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com