Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment: What about arg_name and element_index?
>>> '{}'.format(123) '123' >>> '{0}'.format(123) '123' >>> '{0x0}'.format(123) Traceback (most recent call last): File "<stdin>", line 1, in <module> KeyError: '0x0' >>> '{0_0}'.format(123) Traceback (most recent call last): File "<stdin>", line 1, in <module> KeyError: '0_0' >>> '{0[0]}'.format([123]) '123' >>> '{0[0x0]}'.format([123]) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: list indices must be integers or slices, not str >>> '{0[0_0]}'.format([123]) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: list indices must be integers or slices, not str ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32720> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com