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

def f(n=2):
    class A: n=n
    return A

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 <rep...@bugs.python.org>
Python-bugs-list mailing list

Reply via email to