Why not just show the out-of-range index?
OKB (not okblacke)
brenNOSPAMbarn at NObrenSPAMbarn.net
Mon Dec 4 23:48:46 EST 2006
John Machin wrote:
> 3. The OP asked only for values; you are asking for names and
> values. If you have a magic flak jacket, please let me know; I'd
> like to borrow it occasionally :-)
On reflection I think my alternative suggestion might be just as
good: the interpreter could indicate the character position within the
line. This also handles cases where the operands aren't simple names.
(Not that I have any idea how much harder/easier this would be to
implement.)
I ask for names and values because that is what I want. If I have
some expression containing a bunch of variables and an exception is
raised, the most helpful information for me is the source code token
that is causing the error, because I can see the source code in my text
editor. The value is not as important, because there may be many
different variables that could be holding the same incorrect value. I
only want to look at the one that is ACTUALLY holding the incorrect
value.
--
--OKB (not okblacke)
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is
no path, and leave a trail."
--author unknown
More information about the Python-list
mailing list