René's URL Explorer Experiment


Title: Types not added to binder on initial assignment · Issue #2008 · python/mypy · GitHub

Open Graph Title: Types not added to binder on initial assignment · Issue #2008 · python/mypy

X Title: Types not added to binder on initial assignment · Issue #2008 · python/mypy

Description: from typing import Union x = 0 # type: Union[int, str] reveal_type(x) # Revealed type is 'Union[builtins.int, builtins.str]' x = 0 reveal_type(x) # Revealed type is 'builtins.int' This means if you want to declare a union and then immedi...

Open Graph Description: from typing import Union x = 0 # type: Union[int, str] reveal_type(x) # Revealed type is 'Union[builtins.int, builtins.str]' x = 0 reveal_type(x) # Revealed type is 'builtins.int' This means if you...

X Description: from typing import Union x = 0 # type: Union[int, str] reveal_type(x) # Revealed type is 'Union[builtins.int, builtins.str]' x = 0 reveal_type(x) # Revealed type is 'builtins.int' T...

Opengraph URL: https://github.com/python/mypy/issues/2008

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Types not added to binder on initial assignment","articleBody":"``` py\nfrom typing import Union\nx = 0  # type: Union[int, str]\nreveal_type(x)  # Revealed type is 'Union[builtins.int, builtins.str]'\nx = 0\nreveal_type(x)  # Revealed type is 'builtins.int'\n```\n\nThis means if you want to declare a union and then immediately use it as one specific member, you'll have an awkward time.  For example:\n\n``` py\nx = \"foo\" # type: Optional[str]\nx + \"bar\"  # E: Unsupported operand types for + (\"Union[str, None]\" and \"str\")\n```\n\nTo be consistent with other assignments, we should add types to the binder on initial assignment.  I think a number of Union/Optional tests depend on the current behavior, so those will need to be updated.\n","author":{"url":"https://github.com/ddfisher","@type":"Person","name":"ddfisher"},"datePublished":"2016-08-10T00:41:43Z","url":"https://github.com/python/mypy/issues/2008"}

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:92e3b036-9d73-3ca7-20e5-3fe7bf44dd5e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC7C4:390AA2:1A31F69:235DE4D:6AFFFB10
html-safe-noncecefc4022b7d4f42cd8f5fda7cf2ff251b1005deabe1685b23b4de763464b75a2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDN0M0OjM5MEFBMjoxQTMxRjY5OjIzNURFNEQ6NkFGRkZCMTAiLCJ2aXNpdG9yX2lkIjoiOTE4MTI2MzQxMDQ4MDgwNjY3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac4525b3e4db28ec556f0f65c749550f83c8827664bca49706f29a3a1679133652
hovercard-subject-tagissue:170303630
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/mypy/2008/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ed0dceeeab61ab46630617aa5e780482c7bcbf87032526557448177b9d50d657/python/mypy/issues/2008
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ed0dceeeab61ab46630617aa5e780482c7bcbf87032526557448177b9d50d657/python/mypy/issues/2008
og:image:altfrom typing import Union x = 0 # type: Union[int, str] reveal_type(x) # Revealed type is 'Union[builtins.int, builtins.str]' x = 0 reveal_type(x) # Revealed type is 'builtins.int' This means if you...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameddfisher
hostnamegithub.com
expected-hostnamegithub.com
None0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729
turbo-cache-controlno-preview
go-importgithub.com/python/mypy git https://github.com/python/mypy.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id7053637
octolytics-dimension-repository_nwopython/mypy
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id7053637
octolytics-dimension-repository_network_root_nwopython/mypy
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
release16a11879678aaf97e2a42c33ee70830aa084fa37
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/mypy/issues/2008#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F2008
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%2Fmypy%2Fissues%2F2008
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%2Fmypy
Reloadhttps://github.com/python/mypy/issues/2008
Reloadhttps://github.com/python/mypy/issues/2008
Reloadhttps://github.com/python/mypy/issues/2008
pythonhttps://github.com/python
mypyhttps://github.com/python/mypy
Codehttps://github.com/python/mypy
Issues2.7k (2.7k)https://github.com/python/mypy/issues
Pull requests547 (547)https://github.com/python/mypy/pulls
Actionshttps://github.com/python/mypy/actions
Projectshttps://github.com/python/mypy/projects
Wikihttps://github.com/python/mypy/wiki
Security and qualityhttps://github.com/python/mypy/security
Insightshttps://github.com/python/mypy/insights
https://github.com/python/mypy
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/2008
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/2008
Types not added to binder on initial assignmenthttps://github.com/python/mypy/issues/2008#top
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
priority-2-lowhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-2-low%22
topic-strict-optionalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-strict-optional%22
topic-union-typeshttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-union-types%22
https://github.com/ddfisher
ddfisherhttps://github.com/ddfisher
on Aug 10, 2016https://github.com/python/mypy/issues/2008#issue-170303630
Nexthttps://github.com/python/mypy/issues/2008?timeline_page=1
https://github.com/ddfisher
ddfisherhttps://github.com/ddfisher
on Aug 10, 2016https://github.com/python/mypy/issues/2008#issuecomment-238735165
#1955https://github.com/python/mypy/issues/1955
https://github.com/rwbarton
rwbartonhttps://github.com/rwbarton
on Aug 10, 2016https://github.com/python/mypy/issues/2008#issuecomment-239005160
ddfisherhttps://github.com/ddfisher
topic-strict-optionalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-strict-optional%22
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
on Aug 11, 2016https://github.com/python/mypy/issues/2008#event-753320343
ddfisherhttps://github.com/ddfisher
on Aug 11, 2016https://github.com/python/mypy/issues/2008#event-753320467
https://github.com/ddfisher
ddfisherhttps://github.com/ddfisher
on Oct 25, 2016https://github.com/python/mypy/issues/2008#issuecomment-255908153
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Oct 25, 2016https://github.com/python/mypy/issues/2008#issuecomment-256000651
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Oct 25, 2016https://github.com/python/mypy/issues/2008#issuecomment-256105881
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Oct 25, 2016https://github.com/python/mypy/issues/2008#issuecomment-256111510
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Oct 25, 2016https://github.com/python/mypy/issues/2008#issuecomment-256118505
…https://github.com/python/mypy/issues/2008
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Oct 25, 2016https://github.com/python/mypy/issues/2008#issuecomment-256187910
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Oct 26, 2016https://github.com/python/mypy/issues/2008#issuecomment-256327182
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Oct 26, 2016https://github.com/python/mypy/issues/2008#issuecomment-256327530
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Oct 26, 2016https://github.com/python/mypy/issues/2008#issuecomment-256386275
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Oct 26, 2016https://github.com/python/mypy/issues/2008#issuecomment-256418874
#2008 (comment)https://github.com/python/mypy/issues/2008#issuecomment-255908153
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Apr 21, 2017https://github.com/python/mypy/issues/2008#issuecomment-296283896
https://github.com/pkch
pkchhttps://github.com/pkch
on Apr 21, 2017https://github.com/python/mypy/issues/2008#issuecomment-296309788
#3178https://github.com/python/mypy/issues/3178
suggestinghttps://github.com/python/mypy/issues/2008
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Apr 21, 2017https://github.com/python/mypy/issues/2008#issuecomment-296320942
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Apr 21, 2017https://github.com/python/mypy/issues/2008#issuecomment-296325706
#3https://github.com/python/mypy/issues/3
#4https://github.com/python/mypy/issues/4
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Apr 22, 2017https://github.com/python/mypy/issues/2008#issuecomment-296361604
@ddfisherhttps://github.com/ddfisher
@pkchhttps://github.com/pkch
#3178https://github.com/python/mypy/issues/3178
@ilevkivskyihttps://github.com/ilevkivskyi
@gvanrossumhttps://github.com/gvanrossum
https://github.com/pkch
pkchhttps://github.com/pkch
on Apr 24, 2017https://github.com/python/mypy/issues/2008#issuecomment-296532307
https://github.com/pkch
pkchhttps://github.com/pkch
on May 3, 2017https://github.com/python/mypy/issues/2008#issuecomment-298995855
JukkaLhttps://github.com/JukkaL
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
priority-0-highhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-0-high%22
on Sep 18, 2017https://github.com/python/mypy/issues/2008#event-1253365770
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Sep 18, 2017https://github.com/python/mypy/issues/2008#issuecomment-330211376
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Sep 2, 2020https://github.com/python/mypy/issues/2008#issuecomment-685921433
discussionhttps://mail.python.org/archives/list/typing-sig@python.org/thread/GYVM5KEE6URE6PAH7UTK6324M7GWSFQS/
typing-sighttps://mail.python.org/archives/list/typing-sig@python.org/
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Sep 26, 2020https://github.com/python/mypy/issues/2008#issuecomment-699246693
@erictrauthttps://github.com/erictraut
@shannonzhuhttps://github.com/shannonzhu
I thinkhttps://github.com/python/mypy/issues/2008#issuecomment-296325706
JukkaLhttps://github.com/JukkaL
priority-2-lowhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-2-low%22
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
on Apr 25, 2023https://github.com/python/mypy/issues/2008#event-9096546561
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
on May 13, 2024https://github.com/python/mypy/issues/2008#issuecomment-2107881937
pyright playgroundhttps://pyright-play.net/?strict=true&code=GYJw9gtgBALgngBwJYDsDmUkQWEMoAK4MYAxmADYA0UAygKYXA1gBu9IFYAhgCY20Arghx4AzgEkUvegA8AUPNIVuYsXWGiYY2hSSlUaANoAVAPrkAugAoiYEuQoBKAFzyoHqAAE2HLn3dPGWAoMzM0ehgkGHoIMOsxRmZMaTkXDRFcbSkZWRoAeicoAFoAPihzcnSAOlrAjx92Th5eeqhg0PDI6Nj4xKYaVFz0sT1SegKisrokmrr5CjEYdL0lo1QYSygAXigjAEYqACYqAGYqABZLeVl0oUzxXX1DdZRNnahF-CgAYihAUHIoAB5ADS8hgwnSEIQFHorxgNFq1S2u2shygJyg5ygFyc8jgd00WR0YxeGxRsGEHj%2BgBlyWCIehQDjgEDyIA
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/2008
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/2008
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
priority-2-lowhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-2-low%22
topic-strict-optionalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-strict-optional%22
topic-union-typeshttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-union-types%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.