Re: baffled classes within a function namespace. Evaluation order.
Thats a good pointer to what is going on. Thank you Bas.
I am familiar with error such as
x = 2
UnboundLocalError: local variable 'x' referenced before assignment.
It seems a bit different for classes (below), as it jumps out to get the
value from the global name space, where it didn't for functions (above).
x = 2
x = 3
foo() # This evaluates == 1
But you certainly have explained why "NameError: name 'third' is not
|All times are GMT. The time now is 12:42 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.