[issue18162] Add index attribute to IndexError

Ezio Melotti report at bugs.python.org
Sat Jul 5 15:23:49 CEST 2014


Ezio Melotti added the comment:

Knowing the len of the sequence would also be useful.
Brett, were you also planning to use these attributes in the error message (when they are available), or do you prefer to keep the two issues separate and reopen #21911?

> Is there a meta-issue for these changes?

FTR the other relevant issues are:
  #18156: Add an 'attr' attribute to AttributeError
  #18163: Add a 'key' attribute to KeyError
  #18165: Add 'unexpected_type' to TypeError
  #18166: 'value' attribute for ValueError

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18162>
_______________________________________


More information about the Python-bugs-list mailing list