[Python-Dev] less quick patch for better debugging.
Michael Hudson
mwh at python.net
Thu Nov 27 07:02:52 EST 2003
Greg Ewing <greg at cosc.canterbury.ac.nz> writes:
> Hunter Peress <hunterp at fastmail.fm>:
>
>> a[1] + b[2] + c[3]...currently gives an error message that doesnt say
>> which variable the list index error occurs in or at which index it occurs
>> at
>
> This would be considerably improved if the error message could
> just point out the position in the line instead of just the line
> number.
Any ideas how to do that? I guess you could obfuscate c_lnotab even
more...
> Especially when a statement spans more than one line -- currently
> you can't even tell which line of a multi-line statement was the
> culprit!
This is occasionally very annoying, and is probably fixable -- would
require pretty serious compiler hackery, though.
Cheers,
mwh
--
3. Syntactic sugar causes cancer of the semicolon.
-- Alan Perlis, http://www.cs.yale.edu/homes/perlis-alan/quotes.html
More information about the Python-Dev
mailing list