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 hct
Recipients hct
Date 2013-11-23.02:16:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1385173002.6.0.538237708826.issue19729@psf.upfronthosting.co.za>
In-reply-to
Content
can't find a way around it... maybe a new regression test on this.

Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:18:40) [MSC v.1600 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> "0x{:0{:d}X}".format(0x0,16)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: unmatched '{' in format
>>> "0x{:0{{:d}}X}".format(0x0,16)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Invalid format specifier
>>> "0x{:0{:d}X}".format(0x0,16)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: unmatched '{' in format
>>> "0x{:{:d}X}".format(0x0,16)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: unmatched '{' in format
>>> "0x{:0{:d}X}".format(0x0,16)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: unmatched '{' in format
>>> "0x{:0{:d}x}".format(0x0,16)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: unmatched '{' in format
>>>
>>> "{:0{}x}".format(0,16)
'0000000000000000'

"0x{:0{:d}X}".format(0x0,16) and "{:0{}x}".format(0,16)
work with Python 3.1, 3.2 and up to 3.3.2
History
Date User Action Args
2013-11-23 02:16:42hctsetrecipients: + hct
2013-11-23 02:16:42hctsetmessageid: <1385173002.6.0.538237708826.issue19729@psf.upfronthosting.co.za>
2013-11-23 02:16:42hctlinkissue19729 messages
2013-11-23 02:16:42hctcreate