Terry J. Reedy added the comment:
#17853 was in the context of metaclasses. Even so, I am puzzled by the opening
statement there that
from enum import Enum # I added this as necessary
class Season(Enum):
SPRING = Season()
"works beautifully" at top level as it indeed raises
NameError: name 'Season' is not defined
My point here is that changing the output of
n=1
def f(n=2):
class A: n=n
return A
print(f().n)
from 1, as it has been from the beginning (except for the print change) to 2,
which I believe is implied in the request, is not the sort of syntax change we
do. Hence I think this should be closed.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue19979>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com