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 umedoblock
Recipients ezio.melotti, umedoblock
Date 2012-02-08.18:44:22
SpamBayes Score 7.533329e-05
Marked as misclassified No
Message-id <1328726663.18.0.681265030532.issue13971@psf.upfronthosting.co.za>
In-reply-to
Content
format() mis understaning.
please pay attention to [0], [x].

>>> d = {0: "a", "0": "A"}
>>> 'd[0] = {0[0]}'.format(d)
'd[0] = a'
>>> 'd[0] = {0["0"]}'.format(d)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
KeyError: '"0"'
>>> d2 = {"x": 100}
>>> 'd2[x] = {0[x]}'.format(d2)
'd2[x] = 100'
History
Date User Action Args
2012-02-08 18:44:23umedoblocksetrecipients: + umedoblock, ezio.melotti
2012-02-08 18:44:23umedoblocksetmessageid: <1328726663.18.0.681265030532.issue13971@psf.upfronthosting.co.za>
2012-02-08 18:44:22umedoblocklinkissue13971 messages
2012-02-08 18:44:22umedoblockcreate