Roy Smith added the comment:

(ugh, hit return too soon)

>>> '{1}'.format()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IndexError: tuple index out of range

This is a confusing error message.  The user hasn't written any tuples, so a 
message about a tuple index out of range will just leave them scratching their 
head.  We should either return a more specific subclass of IndexError, or at 
least a more descriptive text describing what went wrong.

See https://mail.python.org/pipermail/python-list/2014-June/674188.html for 
background.

----------
type:  -> behavior
versions: +Python 2.7

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

Reply via email to