Why not just show the out-of-range index?

Russ uymqlp502 at sneakemail.com
Tue Dec 5 12:05:38 EST 2006


stdazi wrote:
> Usually, when I make some coding mistake (index out of range - in this
> case) I just care to fix the mistake and I usually don't mind to
> inspect by how much the index was overflowed. It really seems like a
> feature that should be embedded in some Python debugger than a feature
> in the interpreter itself.

Then why have the interpreter generate error messages at all? I think
it makes sense to make the interpreter as self-contained as possible,
within reason, so you don't depend on a debugger any more than
necessary.

And it's not that I care "how much the index was overflowed." It's that
something unexpected happened, and I want a clue what it was. I'll need
to find out somehow anyway. What is the next logical step if not to
find out what the out-of-range index was?

Having said that, I reiterate that I don't know the implementation
difficulty, so I defer on the decision as to whether it is worth
implementing or not.




More information about the Python-list mailing list