[Python-Dev] quick patch for better debugging

Greg Ewing greg at cosc.canterbury.ac.nz
Sun Nov 23 20:05:50 EST 2003

Hunter Peress <hunterp at fastmail.fm>:

> KeyError: 'jio'  could look like KeyError: "Dictionary(some_name)
> has no key 'jio'"

> IndexError: list(some_name) index(some_value) out of range
Where do you propose to get these names from? Lists and
dictionaries don't have names...

I agree with the general idea of providing some sort of
identifying information, but in these cases I can't think
what sort of information would be useful short of displaying
the entire repr() of the object, which would be too much for
a backtrace message, I think.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+

More information about the Python-Dev mailing list