Title: await not allowed in comprehension in async def · Issue #5315 · RustPython/RustPython · GitHub
Open Graph Title: await not allowed in comprehension in async def · Issue #5315 · RustPython/RustPython
X Title: await not allowed in comprehension in async def · Issue #5315 · RustPython/RustPython
Description: Feature code async def f(): [await a for a in range(1)] expected: No error Actual: File "z.py", line 2 [await a for a in range(1)] ^ SyntaxError: 'await' outside async function Python Documentation or reference to CPython source code
Open Graph Description: Feature code async def f(): [await a for a in range(1)] expected: No error Actual: File "z.py", line 2 [await a for a in range(1)] ^ SyntaxError: 'await' outside async function Python Documentation...
X Description: Feature code async def f(): [await a for a in range(1)] expected: No error Actual: File "z.py", line 2 [await a for a in range(1)] ^ SyntaxError: 'await' outside async function Py...
Opengraph URL: https://github.com/RustPython/RustPython/issues/5315
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"await not allowed in comprehension in async def","articleBody":"## Feature\r\n\r\n\u003c!-- What Python feature is missing from RustPython? Give a short description of the feature and how you ran into its absence. -->\r\n\r\ncode\r\n```python\r\nasync def f():\r\n [await a for a in range(1)]\r\n```\r\n\r\nexpected: No error\r\n\r\nActual:\r\n```sh\r\n File \"z.py\", line 2\r\n [await a for a in range(1)]\r\n ^\r\nSyntaxError: 'await' outside async function\r\n```\r\n\r\n## Python Documentation or reference to CPython source code\r\n\r\n\u003c!-- Give a link to the feature in the CPython documentation (https://docs.python.org/3/) in order to assist in its implementation. -->\r\n","author":{"url":"https://github.com/youknowone","@type":"Person","name":"youknowone"},"datePublished":"2024-05-09T08:07:32Z","url":"https://github.com/RustPython/RustPython/issues/5315"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:cf9ace8e-356b-d54d-0e4e-a0df579335e9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 84A2:2C3D4F:3BF9FA:509DE1:6B0029A1 |
| html-safe-nonce | a14f7ade1d045d09873f5b81c120c54e43af68c0e78c2dfebbb9074cd3ae626e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NEEyOjJDM0Q0RjozQkY5RkE6NTA5REUxOjZCMDAyOUExIiwidmlzaXRvcl9pZCI6Ijg1MzE1MzkzODUyMTUxMDEzNDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5d54c4404917a939e3d7184929f9a7dd209e80b359b3072fff9f3cef65b69d1b |
| hovercard-subject-tag | issue:2287139778 |
| 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/RustPython/RustPython/5315/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d632655d70a27c65c4a8d56caa4fcff4360a817341ae6cb797fdbc310158fbf4/RustPython/RustPython/issues/5315 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d632655d70a27c65c4a8d56caa4fcff4360a817341ae6cb797fdbc310158fbf4/RustPython/RustPython/issues/5315 |
| og:image:alt | Feature code async def f(): [await a for a in range(1)] expected: No error Actual: File "z.py", line 2 [await a for a in range(1)] ^ SyntaxError: 'await' outside async function Python Documentation... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | youknowone |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| 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 | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width