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

alex23 wuwei23 at gmail.com
Fri Oct 30 04:19:01 CET 2009


kj <no.em... at please.post> wrote:
> As my Python apps grow in complexity and execution, I'm finding it
> more often the situation in which a program dies after a lengthy
> (i.e. expensive) run because the execution reaches, say, a typo.

This is a good reason for breaking your program down into testable
units and verifying they behave as expected before a long execution
phase. You can get a long way with unittest in the stdlib, but I
personally prefer using nose[1], I find the tests to be less weighty
in boilerplate.

1: http://code.google.com/p/python-nose/



More information about the Python-list mailing list