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 xtreak
Recipients conchylicultor, eric.smith, gvanrossum, larry, xtreak
Date 2021-04-09.07:05:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1617951941.83.0.907075755525.issue43746@roundup.psfhosted.org>
In-reply-to
Content
I guess this is similar to the explanation at https://bugs.python.org/issue36363#msg338389

> The problem in the original code is that the annotation references a global name that is shadowed by a local (to the class body) name, and because of the initialization, the latter takes precedence.  (To see for yourself, use the dis module to disassemble the code for Spam and Spaz.)
History
Date User Action Args
2021-04-09 07:05:41xtreaksetrecipients: + xtreak, gvanrossum, larry, eric.smith, conchylicultor
2021-04-09 07:05:41xtreaksetmessageid: <1617951941.83.0.907075755525.issue43746@roundup.psfhosted.org>
2021-04-09 07:05:41xtreaklinkissue43746 messages
2021-04-09 07:05:41xtreakcreate