Title: Source locations too broad for list comprehension iterable expression · Issue #123142 · python/cpython · GitHub
Open Graph Title: Source locations too broad for list comprehension iterable expression · Issue #123142 · python/cpython
X Title: Source locations too broad for list comprehension iterable expression · Issue #123142 · python/cpython
Description: Bug report Reported here: #120330 (comment) class Foo: def __iter__(self): assert False a = [x for x in Foo()] output (Python 3.12.5): Traceback (most recent call last): File "/home/frank/projects/executing/codi.py", line 5, in
Open Graph Description: Bug report Reported here: #120330 (comment) class Foo: def __iter__(self): assert False a = [x for x in Foo()] output (Python 3.12.5): Traceback (most recent call last): File "/home/frank/projects/...
X Description: Bug report Reported here: #120330 (comment) class Foo: def __iter__(self): assert False a = [x for x in Foo()] output (Python 3.12.5): Traceback (most recent call last): File "/home/frank/proj...
Opengraph URL: https://github.com/python/cpython/issues/123142
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Source locations too broad for list comprehension iterable expression","articleBody":"# Bug report\n\nReported here: https://github.com/python/cpython/pull/120330#issuecomment-2295256627\n\n```python\nclass Foo:\n def __iter__(self):\n assert False\n\na = [x for x in Foo()]\n```\n\noutput (Python 3.12.5):\n```python\nTraceback (most recent call last):\n File \"/home/frank/projects/executing/codi.py\", line 5, in \u003cmodule\u003e\n a = [x for x in Foo()]\n ^^^^^^^^^^^^^^^^^^\n File \"/home/frank/projects/executing/codi.py\", line 3, in __iter__\n assert False\n ^^^^^\nAssertionError\n```\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-123173\n* gh-123209\n* gh-123210\n* gh-123420\n* gh-123435\n* gh-123436\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/iritkatriel","@type":"Person","name":"iritkatriel"},"datePublished":"2024-08-19T14:22:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/123142/cpython/issues/123142"}
| 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:c4758bfd-68ea-9977-8cb3-64160ba28fb3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B49C:10503:2D7FB3A:3B6BC50:696B7708 |
| html-safe-nonce | 3c2abd85b082c19a85fbaf24edfafcfbc4764ba255a9b8c7aed4f816f798062e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDlDOjEwNTAzOjJEN0ZCM0E6M0I2QkM1MDo2OTZCNzcwOCIsInZpc2l0b3JfaWQiOiI0NjYyMTkyMjk3MjcxMzI2NDcyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | fec0f909637456ec54688fe4580d9d8534e214ae30678af0d7e7a5d01d80f8b6 |
| hovercard-subject-tag | issue:2473493346 |
| 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/123142/issue_layout |
| twitter:image | https://opengraph.githubassets.com/428abeabfc088aa1fba8110059de13f0676eaba64c6a3bd9742b0f0fd43ab2fd/python/cpython/issues/123142 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/428abeabfc088aa1fba8110059de13f0676eaba64c6a3bd9742b0f0fd43ab2fd/python/cpython/issues/123142 |
| og:image:alt | Bug report Reported here: #120330 (comment) class Foo: def __iter__(self): assert False a = [x for x in Foo()] output (Python 3.12.5): Traceback (most recent call last): File "/home/frank/projects/... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | iritkatriel |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width