This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients arigo, ethan.furman, terry.reedy
Date 2014-05-19.02:58:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1400468298.8.0.554331283587.issue19979@psf.upfronthosting.co.za>
In-reply-to
Content
#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.
History
Date User Action Args
2014-05-19 02:58:18terry.reedysetrecipients: + terry.reedy, arigo, ethan.furman
2014-05-19 02:58:18terry.reedysetmessageid: <1400468298.8.0.554331283587.issue19979@psf.upfronthosting.co.za>
2014-05-19 02:58:18terry.reedylinkissue19979 messages
2014-05-19 02:58:17terry.reedycreate