GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||
GeezerVison is showing github.com — gh-109118: Allow lambdas in annotation scopes in classes by JelleZijlstra · Pull Request #118019 · python/cpython Conversation
|
|
Thanks! Yes, I tried locally to do the same thing for comprehensions and couldn't get it to work yet. The naive change (just remove the code that throws a SyntaxError for comprehensions in annotation scopes) no longer crashes like it did in #109118, but due to inlining it doesn't produce the right scoping semantics. I tried to do something like what we did last year in #104528 but couldn't get it to work yet. I haven't had time yet to get back to this. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
One approach I thought of was to simply not inline comprehensions in annotation scopes, but that doesn't seem right as comprehensions would now behave differently in annotation scopes versus elsewhere. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
If you want to (at some point when you get back to it, no rush) push a non-working version with inlined comprehensions in annotation scopes, I'm also willing to take a look and see what I can figure out. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks! I opened #118160 with what I have so far. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.