[docs] [issue7951] Should str.format allow negative indexes when used for __getitem__ access?

Éric Araujo report at bugs.python.org
Thu Apr 25 22:52:28 EDT 2019


Éric Araujo <merwok at netwok.org> added the comment:

A side question: where is it defined that in `{thing[0]}`, 0 will be parsed as an integer?

The PEP shows `{thing[name]}` and mentions that this is not Python but a smaller mini-language, with `name` always a string, no quotes needed or permitted.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue7951>
_______________________________________


More information about the docs mailing list