python first assignment of a global variable

2009-07-15 Thread Rodrigue
hat some reordering is happening behind the scenes that creates a situation similar to the += which assigns hence expects to be at the local level. I would love some enlightenment here Rodrigue -- http://mail.python.org/mailman/listinfo/python-list

Re: python first assignment of a global variable

2009-07-15 Thread Rodrigue
> MY_GLOBAL, by virtue of being assigned to later in the function, and the > absence of a global statement, is identified as a local variable. > When a function contains a > single assignment (or augmented assignment) to a name, the compiler > generates bytecode such that all references to that na