Aaaargh! "global name 'eggz' is not defined"

Alan Franzoni doesnotexist at franzoni.invalid
Sat Oct 31 07:39:59 EDT 2009


On 10/29/09 9:48 PM, kj wrote:
> How can one check that a Python script is lexically correct?

You can use a pseudo-static analyzer like pyflakes, pylint or pydoctor.

Or, better, you can avoid wild imports, excessive local or global
namespace manipulation, and break you program in smaller parts and write
unit tests for them.

Typos are very common but should very easy to catch. If you're not
catching them until a very long run of your program, then your code
coverage is probably too low.

-- 
Alan Franzoni
contact me at public@[mysurname].eu



More information about the Python-list mailing list