-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
bpo-42381: Allow walrus in set literals and set comprehensions #23332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor nit, but other than that LG! 🚀
Misc/NEWS.d/next/Core and Builtins/2020-11-16-23-45-56.bpo-42381.G4AWxL.rst
Show resolved
Hide resolved
Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9. |
Sorry, @pablogsal, I could not cleanly backport this to |
…ythonGH-23332) Currently walruses are not allowerd in set literals and set comprehensions: >>> {y := 4, 4**2, 3**3} File "<stdin>", line 1 {y := 4, 4**2, 3**3} ^ SyntaxError: invalid syntax but they should be allowed as well per PEP 572. (cherry picked from commit b0aba1f) Co-authored-by: Pablo Galindo <[email protected]>
GH-23333 is a backport of this pull request to the 3.9 branch. |
…H-23332) (GH-23333) Currently walruses are not allowerd in set literals and set comprehensions: >>> {y := 4, 4**2, 3**3} File "<stdin>", line 1 {y := 4, 4**2, 3**3} ^ SyntaxError: invalid syntax but they should be allowed as well per PEP 572. (cherry picked from commit b0aba1f) Co-authored-by: Pablo Galindo <[email protected]>
…nGH-23332) Currently walruses are not allowerd in set literals and set comprehensions: >>> {y := 4, 4**2, 3**3} File "<stdin>", line 1 {y := 4, 4**2, 3**3} ^ SyntaxError: invalid syntax but they should be allowed as well per PEP 572
https://bugs.python.org/issue42381