Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:

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.)

----------
nosy: +gvanrossum, xtreak

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43746>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to