Terry J. Reedy added the comment:

Either leading sign, '+' or '-', cause string interpretation, so I think 
'unsigned integer' should be the term in the doc.

>>> '{0[-1]}'.format({'-1': 'neg int key'})
'neg int key'
>>> '{0[+1]}'.format({'+1': 'neg int key'})
'neg int key'
>>> '{0[+1]}'.format([1,2,3])
Traceback (most recent call last):
  File "<pyshell#16>", line 1, in <module>
    '{0[+1]}'.format([1,2,3])
TypeError: list indices must be integers, not str

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7951>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to