[New-bugs-announce] [issue33160] Negative values in positional access inside formatting

Facundo Batista report at bugs.python.org
Tue Mar 27 17:07:48 EDT 2018


New submission from Facundo Batista <facundo at taniquetil.com.ar>:

This works fine:

>>> "{[0]}".format([1, 2, 3])
'1'

This should work too:

>>> "{[-1]}".format([1, 2, 3])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: list indices must be integers or slices, not str

----------
messages: 314549
nosy: facundobatista
priority: normal
severity: normal
status: open
title: Negative values in positional access inside formatting
versions: Python 3.6

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


More information about the New-bugs-announce mailing list