René's URL Explorer Experiment


Title: Fix internal error on list/dict comprehension with walrus operator in global scope by dhood · Pull Request #9062 · python/mypy · GitHub

Open Graph Title: Fix internal error on list/dict comprehension with walrus operator in global scope by dhood · Pull Request #9062 · python/mypy

X Title: Fix internal error on list/dict comprehension with walrus operator in global scope by dhood · Pull Request #9062 · python/mypy

Description: Optional static typing for Python. Contribute to python/mypy development by creating an account on GitHub.

Open Graph Description: Fixes #8986 The reported issue is for list comprehensions involving assignment expressions, though I noticed that dictionary comprehensions are also impacted. # mwe.py lst = [1, 2, 3, 4] processed_...

X Description: Fixes #8986 The reported issue is for list comprehensions involving assignment expressions, though I noticed that dictionary comprehensions are also impacted. # mwe.py lst = [1, 2, 3, 4] processed_...

Opengraph URL: https://github.com/python/mypy/pull/9062

X: @github

direct link

Domain: github.com

route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:da23fc49-20c5-1cc3-4956-c5232fa4c563
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBDC8:238281:2DAB765:3DBD76F:6A53BFE6
html-safe-nonced424fd6a92a45d686ed311fec5f5f64e2ca2e51af5cf7511ead5c968b327f533
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCREM4OjIzODI4MToyREFCNzY1OjNEQkQ3NkY6NkE1M0JGRTYiLCJ2aXNpdG9yX2lkIjoiMjIyODI3Mzg2MTUyMjM0MTg2MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacfb4d4145bc3239e49efd955c1f810f5e7bc1a4b83226ac19833dbd1e6cd0bb4e
hovercard-subject-tagpull_request:441013143
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/mypy/9062/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/6309a0e0a7a8825cc84ad779d019ecbd1c5ee4c490ea55af3e7e87bf9a9f51b2/python/mypy/pull/9062
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/6309a0e0a7a8825cc84ad779d019ecbd1c5ee4c490ea55af3e7e87bf9a9f51b2/python/mypy/pull/9062
og:image:altFixes #8986 The reported issue is for list comprehensions involving assignment expressions, though I noticed that dictionary comprehensions are also impacted. # mwe.py lst = [1, 2, 3, 4] processed_...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedhood
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-cache
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
release07a982c1d40157c619b364352b704c3ce66bb332
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/mypy/pull/9062#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F9062
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F9062
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Fmypy
Reloadhttps://github.com/python/mypy/pull/9062
Reloadhttps://github.com/python/mypy/pull/9062
Reloadhttps://github.com/python/mypy/pull/9062
Please reload this pagehttps://github.com/python/mypy/pull/9062
python https://github.com/python
mypyhttps://github.com/python/mypy
Please reload this pagehttps://github.com/python/mypy/pull/9062
Notifications https://github.com/login?return_to=%2Fpython%2Fmypy
Fork 3.2k https://github.com/login?return_to=%2Fpython%2Fmypy
Star 20.5k https://github.com/login?return_to=%2Fpython%2Fmypy
Code https://github.com/python/mypy
Issues 2.7k https://github.com/python/mypy/issues
Pull requests 464 https://github.com/python/mypy/pulls
Actions https://github.com/python/mypy/actions
Projects https://github.com/python/mypy/projects
Wiki https://github.com/python/mypy/wiki
Security and quality 0 https://github.com/python/mypy/security
Insights https://github.com/python/mypy/pulse
Code https://github.com/python/mypy
Issues https://github.com/python/mypy/issues
Pull requests https://github.com/python/mypy/pulls
Actions https://github.com/python/mypy/actions
Projects https://github.com/python/mypy/projects
Wiki https://github.com/python/mypy/wiki
Security and quality https://github.com/python/mypy/security
Insights https://github.com/python/mypy/pulse
JelleZijlstrahttps://github.com/JelleZijlstra
python:masterhttps://github.com/python/mypy/tree/master
dhood:walrus_comprehension_global_bugfixhttps://github.com/dhood/mypy/tree/walrus_comprehension_global_bugfix
Conversationhttps://github.com/python/mypy/pull/9062
Commits6 (6)https://github.com/python/mypy/pull/9062/commits
Checkshttps://github.com/python/mypy/pull/9062/checks
Files changedhttps://github.com/python/mypy/pull/9062/files
Fix internal error on list/dict comprehension with walrus operator in global scopehttps://github.com/python/mypy/pull/9062#top
JelleZijlstrahttps://github.com/JelleZijlstra
python:masterhttps://github.com/python/mypy/tree/master
dhood:walrus_comprehension_global_bugfixhttps://github.com/dhood/mypy/tree/walrus_comprehension_global_bugfix
https://github.com/dhood
dhoodhttps://github.com/dhood
Jun 28, 2020https://github.com/python/mypy/pull/9062#issue-646857368
Please reload this pagehttps://github.com/python/mypy/pull/9062
#8986https://github.com/python/mypy/issues/8986
#6899https://github.com/python/mypy/pull/6899
store the variables in the scope of the comprehension's callerhttps://github.com/python/mypy/pull/6899/files#diff-ebbe3135b7d21c5fa8783a4d0d0ccd48R4448
Please reload this pagehttps://github.com/python/mypy/pull/9062
dhoodhttps://github.com/dhood
June 28, 2020 16:29https://github.com/python/mypy/pull/9062#commits-pushed-e66891f
https://github.com/dhood
Add tests for dicts using assignment expressionhttps://github.com/python/mypy/pull/9062/commits/e66891f80f2632f843ff229bf4513e90974eb71c
e66891fhttps://github.com/python/mypy/pull/9062/commits/e66891f80f2632f843ff229bf4513e90974eb71c
https://github.com/dhood
Duplicate walrus dict/list tests to global scope (passing)https://github.com/python/mypy/pull/9062/commits/c0f633f655e497938e16a3776ae44bdb6a9947c0
c0f633fhttps://github.com/python/mypy/pull/9062/commits/c0f633f655e497938e16a3776ae44bdb6a9947c0
https://github.com/dhood
Duplicate walrus comprehension tests to global scope (now failing)https://github.com/python/mypy/pull/9062/commits/822813dad1f30118d5c7f5e69708177beef7021d
822813dhttps://github.com/python/mypy/pull/9062/commits/822813dad1f30118d5c7f5e69708177beef7021d
https://github.com/dhood
Use global symbol table if 1st non-comprehension scopehttps://github.com/python/mypy/pull/9062/commits/ed9ba4f87fadefa9de335246bf2c12135dec735c
ed9ba4fhttps://github.com/python/mypy/pull/9062/commits/ed9ba4f87fadefa9de335246bf2c12135dec735c
https://github.com/dhood
dhoodhttps://github.com/dhood
Jun 28, 2020 https://github.com/python/mypy/pull/9062#pullrequestreview-438758223
View reviewed changes https://github.com/python/mypy/pull/9062/files/ed9ba4f87fadefa9de335246bf2c12135dec735c
test-data/unit/check-python38.testhttps://github.com/python/mypy/pull/9062/files/ed9ba4f87fadefa9de335246bf2c12135dec735c#diff-4b39b589073a004f6731ca741f9d0237f1b6c2fe19e37340d686bc5e26f642fb
dhoodhttps://github.com/dhood
Jun 28, 2020https://github.com/python/mypy/pull/9062#discussion_r446620726
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/9062
JelleZijlstrahttps://github.com/JelleZijlstra
Jun 28, 2020https://github.com/python/mypy/pull/9062#discussion_r446659896
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/9062
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
Jun 28, 2020 https://github.com/python/mypy/pull/9062#pullrequestreview-438787071
View reviewed changes https://github.com/python/mypy/pull/9062/files/ed9ba4f87fadefa9de335246bf2c12135dec735c
JelleZijlstrahttps://github.com/JelleZijlstra
https://github.com/python/mypy/pull/9062#pullrequestreview-438787071
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://www.python.org/dev/peps/pep-0572/#scope-of-the-targethttps://www.python.org/dev/peps/pep-0572/#scope-of-the-target
Please reload this pagehttps://github.com/python/mypy/pull/9062
mypy/semanal.pyhttps://github.com/python/mypy/pull/9062/files/ed9ba4f87fadefa9de335246bf2c12135dec735c#diff-f782aad4853edceb67a88efe43d2869579d075a77b8e8dd2add91e818a9fa164
JelleZijlstrahttps://github.com/JelleZijlstra
Jun 28, 2020https://github.com/python/mypy/pull/9062#discussion_r446660139
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/9062
dhoodhttps://github.com/dhood
Jun 29, 2020https://github.com/python/mypy/pull/9062#discussion_r447285246
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
mypy/mypy/semanal.pyhttps://github.com/python/mypy/blob/ed9ba4f87fadefa9de335246bf2c12135dec735c/mypy/semanal.py#L226
ed9ba4fhttps://github.com/python/mypy/commit/ed9ba4f87fadefa9de335246bf2c12135dec735c
mypy/mypy/semanal.pyhttps://github.com/python/mypy/blob/ed9ba4f87fadefa9de335246bf2c12135dec735c/mypy/semanal.py#L1166
ed9ba4fhttps://github.com/python/mypy/commit/ed9ba4f87fadefa9de335246bf2c12135dec735c
Please reload this pagehttps://github.com/python/mypy/pull/9062
dhoodhttps://github.com/dhood
Jul 5, 2020https://github.com/python/mypy/pull/9062#discussion_r449857807
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
a68bd68https://github.com/python/mypy/commit/a68bd68958cfa37bfc1a4d9d9946c07b3a63e518
https://www.python.org/dev/peps/pep-0572/#scope-of-the-targethttps://www.python.org/dev/peps/pep-0572/#scope-of-the-target
Please reload this pagehttps://github.com/python/mypy/pull/9062
https://github.com/dhood
dhoodhttps://github.com/dhood
Jun 29, 2020https://github.com/python/mypy/pull/9062#issuecomment-651394881
Please reload this pagehttps://github.com/python/mypy/pull/9062
https://github.com/dhood
dhoodhttps://github.com/dhood
June 29, 2020 22:14https://github.com/python/mypy/pull/9062#event-3494786095
dhoodhttps://github.com/dhood
July 5, 2020 19:43https://github.com/python/mypy/pull/9062#commits-pushed-a68bd68
https://github.com/dhood
Confirm the symbol table retrieved is not Nonehttps://github.com/python/mypy/pull/9062/commits/a68bd68958cfa37bfc1a4d9d9946c07b3a63e518
a68bd68https://github.com/python/mypy/pull/9062/commits/a68bd68958cfa37bfc1a4d9d9946c07b3a63e518
https://github.com/dhood
Add tests for assignment expression in class scopehttps://github.com/python/mypy/pull/9062/commits/8585a4f11a929b56b5f83379fc6192a62f9a09bd
8585a4fhttps://github.com/python/mypy/pull/9062/commits/8585a4f11a929b56b5f83379fc6192a62f9a09bd
PEP 572: Invalid python syntax for walrus operator not raising parser error #9095 https://github.com/python/mypy/issues/9095
PEP 572: re-use of variable defined with assignment expression / walrus operator not permitted #9096 https://github.com/python/mypy/issues/9096
https://github.com/dhood
dhoodhttps://github.com/dhood
Jul 5, 2020https://github.com/python/mypy/pull/9062#issuecomment-653870887
@JelleZijlstrahttps://github.com/JelleZijlstra
8585a4fhttps://github.com/python/mypy/commit/8585a4f11a929b56b5f83379fc6192a62f9a09bd
https://www.python.org/dev/peps/pep-0572/#scope-of-the-targethttps://www.python.org/dev/peps/pep-0572/#scope-of-the-target
PEP 572: Invalid python syntax for walrus operator not raising parser error #9095https://github.com/python/mypy/issues/9095
Walrus operators unrecognised in dictionary initialisation of a class attribute #8379https://github.com/python/mypy/issues/8379
PEP 572: re-use of variable defined with assignment expression / walrus operator not permitted #9096https://github.com/python/mypy/issues/9096
Please reload this pagehttps://github.com/python/mypy/pull/9062
https://github.com/dhood
dhoodhttps://github.com/dhood
July 5, 2020 10:30https://github.com/python/mypy/pull/9062#event-3513209387
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
Aug 4, 2020 https://github.com/python/mypy/pull/9062#pullrequestreview-460478693
View reviewed changes https://github.com/python/mypy/pull/9062/files/8585a4f11a929b56b5f83379fc6192a62f9a09bd
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
5a9d022https://github.com/python/mypy/commit/5a9d022cee6ef51fe5e9eb534682ef8bc9a229f2
Aug 4, 2020https://github.com/python/mypy/pull/9062#event-3618433560
https://github.com/dhood
dhoodhttps://github.com/dhood
Aug 4, 2020https://github.com/python/mypy/pull/9062#issuecomment-668384657
@JelleZijlstrahttps://github.com/JelleZijlstra
Please reload this pagehttps://github.com/python/mypy/pull/9062
https://github.co/hiddenchars
https://github.com/python/mypy/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F9062
https://github.com/JelleZijlstra
JelleZijlstra https://github.com/JelleZijlstra
https://github.com/python/mypy/pull/9062/files/8585a4f11a929b56b5f83379fc6192a62f9a09bd
Bug: INTERNAL ERROR from := assignment expression within list comprehension https://github.com/python/mypy/issues/8986
Please reload this pagehttps://github.com/python/mypy/pull/9062
https://github.com/dhood
https://github.com/JelleZijlstra
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.