Author gvanrossum
Recipients BTaskaya, Mark.Shannon, gvanrossum, larry, lys.nikolaou, pablogsal, serhiy.storchaka
Date 2021-01-18.20:09:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
I'm not keen on prohibiting nonlocal variable reference in annotations,
since I can imagine uses for this (e.g. in tests). I'm not too worried
about keeping the cell alive "forever", since with Larry's PEP 649 their
lifetime would end when the object containing the annotation ends.

Someone should look into how Batuhan's super()-in-annotation example would
behave under Larry's PEP 649. (Using super() in the magical function Larry
proposes to generate might not work anyway, since super()'s own magical
powers don't work in a nested function.)

Re: issue42737, not sure what to do for that, since neither PEP 563 nor PEP
649 gives a way to access those annotations. Then again, that's also true
for annotations on local variables. So maybe we can treat them the same?
Type checkers won't care, and runtime uses of annotations (whether as type
hints or otherwise) won't have access......
Date User Action Args
2021-01-18 20:09:59gvanrossumsetrecipients: + gvanrossum, larry, Mark.Shannon, serhiy.storchaka, lys.nikolaou, pablogsal, BTaskaya
2021-01-18 20:09:59gvanrossumlinkissue42725 messages
2021-01-18 20:09:58gvanrossumcreate