Title: Improve syntax error for invalid imports · Issue #98931 · python/cpython · GitHub
Open Graph Title: Improve syntax error for invalid imports · Issue #98931 · python/cpython
X Title: Improve syntax error for invalid imports · Issue #98931 · python/cpython
Description: Is quite common to type import x from y instead of from y import x. We can easily offer a better error message in this case. PR: gh-98932 PR: gh-105985 PR: gh-105991
Open Graph Description: Is quite common to type import x from y instead of from y import x. We can easily offer a better error message in this case. PR: gh-98932 PR: gh-105985 PR: gh-105991
X Description: Is quite common to type import x from y instead of from y import x. We can easily offer a better error message in this case. PR: gh-98932 PR: gh-105985 PR: gh-105991
Opengraph URL: https://github.com/python/cpython/issues/98931
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve syntax error for invalid imports","articleBody":"Is quite common to type `import x from y` instead of `from y import x`. We can easily offer a better error message in this case.\n\n\u003c!-- gh-pr-number: gh-98932 --\u003e\n* PR: gh-98932\n\u003c!-- /gh-pr-number --\u003e\n\n\n\u003c!-- gh-pr-number: gh-105985 --\u003e\n* PR: gh-105985\n\u003c!-- /gh-pr-number --\u003e\n\n\n\u003c!-- gh-pr-number: gh-105991 --\u003e\n* PR: gh-105991\n\u003c!-- /gh-pr-number --\u003e\n","author":{"url":"https://github.com/pablogsal","@type":"Person","name":"pablogsal"},"datePublished":"2022-10-31T22:53:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/98931/cpython/issues/98931"}
| 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:3c791e14-35ae-adc6-6026-35b725dd6adf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A1D8:21FEDA:27B404D:35D5C22:696AE159 |
| html-safe-nonce | 6833904f2df042d2fdceca3c11d5250c56438da0b6d127aef4cf32f8f8ab93b8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMUQ4OjIxRkVEQToyN0I0MDREOjM1RDVDMjI6Njk2QUUxNTkiLCJ2aXNpdG9yX2lkIjoiMjM5MjYxMTEyMTQxMjEwNDUzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | aa8b9eb8cda95e37783f546ca1d01c464ff10408416119705bbca1cd162e0bba |
| hovercard-subject-tag | issue:1430599139 |
| 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/98931/issue_layout |
| twitter:image | https://opengraph.githubassets.com/63b736e48b94717c60120fbd33eb6309d2f4efff1921430c573bbc2a6c10b45a/python/cpython/issues/98931 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/63b736e48b94717c60120fbd33eb6309d2f4efff1921430c573bbc2a6c10b45a/python/cpython/issues/98931 |
| og:image:alt | Is quite common to type import x from y instead of from y import x. We can easily offer a better error message in this case. PR: gh-98932 PR: gh-105985 PR: gh-105991 |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pablogsal |
| 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 | 3d84d50b3c75fa36755c3cf392edbc09e626f979 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width