NevilleDNZ wrote: > Steve Holden wrote: > >>Hardly surprising. This statement is an assignment to x2, which >>therefore becomes local to the function. Since no previous value has >>been assigned to this local, the exception occurs. > > > But: In this case the assignment is never reached.... eg..
Doesn't matter. It's not the *execution* of the assignment that makes the name local, it's the *existence* of the assignment, detected by static code analysis. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail.python.org/mailman/listinfo/python-list