New submission from umedoblock umedobl...@gmail.com:
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}
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13971
___
___
Python-bugs-list
Eric V. Smith e...@trueblade.com added the comment:
This is working as defined in PEP 3101: it calls PySequence_GetItem() or
PyObject_GetItem() on the value inside the brackets. There is indeed no item in
d that is the string 0 (including the quotes).
--
assignee: - eric.smith