gh-109118: Allow lambdas in annotation scopes in classes by JelleZijlstra 路 Pull Request #118019 路 python/cpython (original) (raw)

Looks fine! I do think this will probably be the most intuitive behavior, though it's a little weird in principle for visibility to not be transitive. I guess it didn't turn out to be the case at all that this non-transitivity would require re-working abstractions in symtable.c!

I apologize in advance for the difficulties I assume you will encounter in making this work for comprehensions :/