Title: The use of comments to communicate with the type checker · Issue #35 · python/typing · GitHub
Open Graph Title: The use of comments to communicate with the type checker · Issue #35 · python/typing
X Title: The use of comments to communicate with the type checker · Issue #35 · python/typing
Description: mypy supports comments of the form # type:
Open Graph Description: mypy supports comments of the form # type:
X Description: mypy supports comments of the form # type: <some_type> and there are proposals for other uses of comments (e.g. # typing: off). Comments are a convenient solution for things that are hard or ...
Opengraph URL: https://github.com/python/typing/issues/35
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The use of comments to communicate with the type checker","articleBody":"mypy supports comments of the form `# type: \u003csome_type>` and there are proposals for other uses of comments (e.g. `# typing: off`). Comments are a convenient solution for things that are hard or inefficient to express in existing Python syntax (i.e. code that works at runtime). But they have the downside that they are inaccessible to runtime machinery that might want to use type annotations, and the Python AST module doesn't preserve comments, so code that needs access to the comments must implement its own parser (like mypy does).\n\nI ask: should we define such comments in the PEP or not?\n","author":{"url":"https://github.com/gvanrossum","@type":"Person","name":"gvanrossum"},"datePublished":"2015-01-08T04:46:00Z","url":"https://github.com/python/typing/issues/35"}
| 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:191d74d7-3a07-b59d-9171-8df063a2cb55 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D5D6:20C2C9:412452:590094:6B006ECB |
| html-safe-nonce | cc998adddc63b1e3f8fb60e031121a8f4663a551c894dbe4b7f93c19b7f6e27d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENUQ2OjIwQzJDOTo0MTI0NTI6NTkwMDk0OjZCMDA2RUNCIiwidmlzaXRvcl9pZCI6IjUzNzU1MTI5MzQxMDc2MDY3MzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1aaefc78ba1034c21e86f8604cdea9c9dd8723ce6ede0832b5df310d8c81681b |
| hovercard-subject-tag | issue:53714288 |
| 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/typing/35/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f7cf08e5e180ce3b28d68ae494c884e02fba7b21242e5982f2788ebed76c10e3/python/typing/issues/35 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f7cf08e5e180ce3b28d68ae494c884e02fba7b21242e5982f2788ebed76c10e3/python/typing/issues/35 |
| og:image:alt | mypy supports comments of the form # type: |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gvanrossum |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6527e91c60c0b29d16606ff32ac5df8ecdc37a2a62205ea057a14d7762c870fa |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typing git https://github.com/python/typing.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 24604008 |
| octolytics-dimension-repository_nwo | python/typing |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24604008 |
| octolytics-dimension-repository_network_root_nwo | python/typing |
| 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 | 46f1cd2ae3cd8ae1a81019b5d619742e76f13bbd |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width