[issue19979] Missing nested scope vars in class scope (bis)

Armin Rigo report at bugs.python.org
Mon May 19 09:55:59 CEST 2014


Armin Rigo added the comment:

Terry: I meant exactly what I wrote, and not some unrelated examples:

    def f():
        n = 1
        class A: n = n

doesn't work, but the same two lines ("n = 1"; "class A: n = n") work if written at module level instead of in a function.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19979>
_______________________________________


More information about the Python-bugs-list mailing list