Evaluating *EVERYTHING*
David Allen
mda at idatar.com
Thu Mar 29 13:58:18 EST 2001
Quick question:
How do I get the interpreter to 'validate' code by
trying to evaluate *everything* so I can catch bugs?
For example, recently while hacking I discovered that
in a file where I was using FoobarException, I wrote
this line:
raise FoobarExceptoin
The typo would have caused a runtime error. I never
found this though, because that condition never came
up in testing. (It's pretty obscure and time related,
I don't think I could have manufactured it if I wanted
to)
Is there a way to get python to look through a whole
file and say "Whoa there bucky - I've never heard
of FoobarExceptoin"
I know that there are other more subtle problems,
like:
typo = 5
tyop = typo * 5
and that the compiler can't probably catch those. But
surely it should be able to catch the programmer
trying to raise an exception that doesn't exist?
--
David Allen
http://opop.nols.com/
----------------------------------------
When everything's coming your way, you're in the wrong lane.
More information about the Python-list
mailing list