Title: PEP 709: Crash with lambda + nested scope · Issue #104602 · python/cpython · GitHub
Open Graph Title: PEP 709: Crash with lambda + nested scope · Issue #104602 · python/cpython
X Title: PEP 709: Crash with lambda + nested scope · Issue #104602 · python/cpython
Description: This crashes on main: def a(): def a(): [(lambda : b) for b in [a]] print(b) The original reproducer (found with my fork of https://github.com/carljm/compgenerator) was class a: def a(): class a: [(lambda : (a := a[(a := 2)])[b]) for b i...
Open Graph Description: This crashes on main: def a(): def a(): [(lambda : b) for b in [a]] print(b) The original reproducer (found with my fork of https://github.com/carljm/compgenerator) was class a: def a(): class a: [...
X Description: This crashes on main: def a(): def a(): [(lambda : b) for b in [a]] print(b) The original reproducer (found with my fork of https://github.com/carljm/compgenerator) was class a: def a(): class a: [...
Opengraph URL: https://github.com/python/cpython/issues/104602
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PEP 709: Crash with lambda + nested scope","articleBody":"This crashes on main:\r\n\r\n```python\r\ndef a():\r\n def a():\r\n [(lambda : b) for b in [a]]\r\n print(b)\r\n```\r\n\r\nThe original reproducer (found with my fork of https://github.com/carljm/compgenerator) was\r\n\r\n```python\r\nclass a:\r\n def a():\r\n class a:\r\n [(lambda : (a := a[(a := 2)])[b]) for b in (lambda b, a: 7)[a]]\r\n [][2] = b\r\n (1)[lambda a: a] = 4\r\n (2)[2] = b = a\r\n (4)[lambda b, a: b] = a = lambda : 1\r\n```\r\n\r\nFound in https://github.com/python/cpython/pull/104528#issuecomment-1551772622 but turned out be unrelated to that PR.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-104603\n* gh-104639\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/JelleZijlstra","@type":"Person","name":"JelleZijlstra"},"datePublished":"2023-05-18T04:14:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/104602/cpython/issues/104602"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:54940206-b127-7723-df5a-e345c185a28b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DB1A:2ECB0B:51C191:760B69:696A0649 |
| html-safe-nonce | e26c8bd6d3f11b11450ca012e5b3a13bf498d6b41655eae66a1b05ae39df13d8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjFBOjJFQ0IwQjo1MUMxOTE6NzYwQjY5OjY5NkEwNjQ5IiwidmlzaXRvcl9pZCI6IjM3MTkyNDMzNzcxNjk1MzI0ODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ac74c45bb19109923605a54725f0fd6d495a415b71afec164484f0d0ba96e53a |
| hovercard-subject-tag | issue:1714953634 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/104602/issue_layout |
| twitter:image | https://opengraph.githubassets.com/167fd36946978669716277c92518e1cf832cdbef3a8d86f134fca1466d98fe96/python/cpython/issues/104602 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/167fd36946978669716277c92518e1cf832cdbef3a8d86f134fca1466d98fe96/python/cpython/issues/104602 |
| og:image:alt | This crashes on main: def a(): def a(): [(lambda : b) for b in [a]] print(b) The original reproducer (found with my fork of https://github.com/carljm/compgenerator) was class a: def a(): class a: [... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JelleZijlstra |
| hostname | github.com |
| expected-hostname | github.com |
| None | 578c119ff0247c8b2f2491fbf4fc0395cdf909d4df66598cebdc96ddfc4418dc |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 671c2f67171dbced24284331f3133a613d08c366 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width