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

BJörn Lindqvist bjourne at gmail.com
Mon Dec 4 14:58:30 EST 2006


On 12/4/06, OKB (not okblacke) <brenNOSPAMbarn at nobrenspambarn.net> wrote:
>         I think the same could be said of virtually all exceptions.  What I
> think would be ideal is that whenever an exception is raised, the
> traceback tells you:
>
>         1) What the exception is
>         2) The names of the variables involved in the offending expression
> (or their character position in the line)
>         3) The values of those variables

There was a patch to that effect and a thread about it on python-dev
two years ago [1]. Most python-devvers seemed skeptical. But the issue
haven't come to closure yet.

[1] - http://mail.python.org/pipermail/python-dev/2005-February/051470.html

-- 
mvh Björn



More information about the Python-list mailing list