[issue34961] Global scoping when shadowing local names in class definitions

2018-10-12 Thread multun
multun added the comment: Closing, this is documented, and as such most likely intended. "A class definition is an executable statement that may use and define names. These references follow the normal rules for name resolution with an exception that unbound local variables are look

[issue34961] Global scoping when shadowing local names in class definitions

2018-10-11 Thread multun
New submission from multun : Hello, >>> a="global" >>> def func(a): ... class wtf(): ... a=a ... return wtf ... >>> func("local").a 'global' >>> def func2(a): ... class wtf(): ... b=a ... return