baffled classes within a function namespace. Evaluation order.

Steven D'Aprano steve+comp.lang.python at pearwood.info
Fri Apr 26 23:44:25 EDT 2013


On Fri, 26 Apr 2013 09:15:51 +0200, Peter Otten wrote:

> Define a global variable x and run it again. I don't have an ancient
> Python lying around but my "prediction" is
> 
>>>> x = 42
>>>> f().x
> 42
> 
> which would be the same behaviour as that of Python 3.3.


/facepalm


You're absolutely right. Sorry for the noise.




-- 
Steven



More information about the Python-list mailing list