René's URL Explorer Experiment


Title: Specify how type checkers should interpret `__exit__` annotations · Issue #1535 · python/typing · GitHub

Open Graph Title: Specify how type checkers should interpret `__exit__` annotations · Issue #1535 · python/typing

X Title: Specify how type checkers should interpret `__exit__` annotations · Issue #1535 · python/typing

Description: The typing spec should provide guidance on how type checkers should handle __exit__ annotations. This method is special because __exit__ methods can suppress exceptions, and whether or not they do so affects the control flow through a fu...

Open Graph Description: The typing spec should provide guidance on how type checkers should handle __exit__ annotations. This method is special because __exit__ methods can suppress exceptions, and whether or not they do ...

X Description: The typing spec should provide guidance on how type checkers should handle __exit__ annotations. This method is special because __exit__ methods can suppress exceptions, and whether or not they do ...

Opengraph URL: https://github.com/python/typing/issues/1535

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Specify how type checkers should interpret `__exit__` annotations","articleBody":"The typing spec should provide guidance on how type checkers should handle `__exit__` annotations. This method is special because `__exit__` methods can suppress exceptions, and whether or not they do so affects the control flow through a function.\r\n\r\nIn code like this:\r\n\r\n```python\r\na: int | None = None\r\nwith some_context():\r\n    a = 1\r\nreveal_type(a)\r\n```\r\nWhat is the type of `a`? It depends on whether `some_context()` can suppress exceptions or not. Most context managers don't, but in theory they can. A pedantically correct decision might be to assume that they can always suppress exceptions (so `a` might still be `None` in the sample), but that will often lead to a bad user experience.\r\n\r\nMypy currently follows [a heuristic](https://github.com/python/mypy/issues/7214#issuecomment-513618450) I proposed a few years ago. Should we formalize that heuristic into the spec, or something else?\r\n\r\nThis is important to specify because it affects how library authors should annotate their `__exit__` methods. I'll probably pursue getting this into the spec in the next few months.\r\n\r\n","author":{"url":"https://github.com/JelleZijlstra","@type":"Person","name":"JelleZijlstra"},"datePublished":"2023-12-11T05:08:20Z","url":"https://github.com/python/typing/issues/1535"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:db15f273-954a-1d4f-9d78-f52a130b21cd
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9020:3EE843:2605754:33F3729:6B00432A
html-safe-nonce75e3cb588d1eb7fbad8a4e88dbf958daa4a32722873182f06cf87e8aadf66452
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDIwOjNFRTg0MzoyNjA1NzU0OjMzRjM3Mjk6NkIwMDQzMkEiLCJ2aXNpdG9yX2lkIjoiNjYxMDMwMTE1Mzk0MDg4MjIxOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacfca547b94f3f4f69dc1aca6fe939b9b57f94d5b13650956a474563735cb40d2f
hovercard-subject-tagissue:2034841745
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/typing/1535/issue_layout
twitter:imagehttps://opengraph.githubassets.com/cb055ef1d8da008fe640cfc410978b081f1059dcf04fe1a7cf8f5413083044d6/python/typing/issues/1535
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/cb055ef1d8da008fe640cfc410978b081f1059dcf04fe1a7cf8f5413083044d6/python/typing/issues/1535
og:image:altThe typing spec should provide guidance on how type checkers should handle __exit__ annotations. This method is special because __exit__ methods can suppress exceptions, and whether or not they do ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameJelleZijlstra
hostnamegithub.com
expected-hostnamegithub.com
None7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0
turbo-cache-controlno-preview
go-importgithub.com/python/typing git https://github.com/python/typing.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id24604008
octolytics-dimension-repository_nwopython/typing
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24604008
octolytics-dimension-repository_network_root_nwopython/typing
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef3f3a43ca095cdea3abbb394112e971f9fdb94fa
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/typing/issues/1535#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftyping%2Fissues%2F1535
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftyping%2Fissues%2F1535
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Ftyping
Reloadhttps://github.com/python/typing/issues/1535
Reloadhttps://github.com/python/typing/issues/1535
Reloadhttps://github.com/python/typing/issues/1535
pythonhttps://github.com/python
typinghttps://github.com/python/typing
Codehttps://github.com/python/typing
Issues206 (206)https://github.com/python/typing/issues
Pull requests27 (27)https://github.com/python/typing/pulls
Discussionshttps://github.com/python/typing/discussions
Actionshttps://github.com/python/typing/actions
Security and qualityhttps://github.com/python/typing/security
Insightshttps://github.com/python/typing/insights
https://github.com/python/typing
New issuehttps://github.com/login?return_to=https://github.com/python/typing/issues/1535
New issuehttps://github.com/login?return_to=https://github.com/python/typing/issues/1535
Specify how type checkers should interpret __exit__ annotationshttps://github.com/python/typing/issues/1535#top
topic: documentationDocumentation-related issues and PRshttps://github.com/python/typing/issues?q=state%3Aopen%20label%3A%22topic%3A%20documentation%22
topic: typing specFor improving the typing spechttps://github.com/python/typing/issues?q=state%3Aopen%20label%3A%22topic%3A%20typing%20spec%22
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on Dec 11, 2023https://github.com/python/typing/issues/1535#issue-2034841745
a heuristichttps://github.com/python/mypy/issues/7214#issuecomment-513618450
JelleZijlstrahttps://github.com/JelleZijlstra
topic: documentationDocumentation-related issues and PRshttps://github.com/python/typing/issues?q=state%3Aopen%20label%3A%22topic%3A%20documentation%22
topic: typing specFor improving the typing spechttps://github.com/python/typing/issues?q=state%3Aopen%20label%3A%22topic%3A%20typing%20spec%22
on Dec 11, 2023https://github.com/python/typing/issues/1535#event-11205390948
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Dec 11, 2023https://github.com/python/typing/issues/1535#issuecomment-1849355821
Discourse threadhttps://discuss.python.org/t/add-an-else-clause-to-with-statements-to-detect-early-termination/38031
https://github.com/Daverball
Daverballhttps://github.com/Daverball
on Dec 11, 2023https://github.com/python/typing/issues/1535#issuecomment-1849555747
prototyped a changehttps://github.com/python/typeshed/pull/11048
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on May 23, 2024https://github.com/python/typing/issues/1535#issuecomment-2126271741
python/typing-council#27https://github.com/python/typing-council/issues/27
JelleZijlstrahttps://github.com/JelleZijlstra
completedhttps://github.com/python/typing/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on May 23, 2024https://github.com/python/typing/issues/1535#event-12903647978
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/typing/issues/1535
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/typing/issues/1535
topic: documentationDocumentation-related issues and PRshttps://github.com/python/typing/issues?q=state%3Aopen%20label%3A%22topic%3A%20documentation%22
topic: typing specFor improving the typing spechttps://github.com/python/typing/issues?q=state%3Aopen%20label%3A%22topic%3A%20typing%20spec%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.