Evaluating python - a question

Sheila King sheila at spamcop.net
Thu May 17 16:55:51 EDT 2001


On Thu, 17 May 2001 20:29:33 GMT, "Stephen Hansen" <news at myNOSPAM.org> wrote in
comp.lang.python in article <NwWM6.43861$mu1.10824932 at typhoon.we.rr.com>:

:    Contrary to popular belief, I've never actually had to search my
:projects endlessly as I looked for such an error. So, either I don't typo,
:or its not quite so hard to find the typos when they do occur.
:    Perhaps its just me, but dispite what everyone who doesn't know Python
:seems to always say, errors related to A) the theoretical 'ease' of
:misindenting something, and B) typos of variable names, never did show up
:for me.

OH, I have had problems with the "misindenting". I had some cgi script (this was
when I was very new to python) that I spent hours trying to figure out what was
wrong. Finally, someone else found the mistake for me (on the Python-tutor
mailing list). After that, I encountered it one or two more times--and found the
error myself. Then I got an editor that shows white space (PythonWin), and now
it is not a problem any more.

As for the typos, I just imagine that the error messages in the code, will point
you to a line number near to where the error is occurring, and you will trace it
back through the code. I don't think it is like randomly searching through a
haystack for a needle. Other than that, the suggestion to use accessor methods,
instead of accessing the datamembers directly, is probably another good tip.

--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/





More information about the Python-list mailing list