Staging
v0.5.1
https://github.com/python/cpython
Revision 87c87b5bd6f6a5924b485398f353308410f9d8c1 authored by Pablo Galindo on 18 November 2020, 23:44:30 UTC, committed by GitHub on 18 November 2020, 23:44:30 UTC
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 b0aba1fcdc3da952698d99aec2334faa79a8b68c)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
1 parent 36619e1
History
Tip revision: 87c87b5bd6f6a5924b485398f353308410f9d8c1 authored by Pablo Galindo on 18 November 2020, 23:44:30 UTC
[3.9] bpo-42381: Allow walrus in set literals and set comprehensions (GH-23332) (GH-23333)
Tip revision: 87c87b5
File Mode Size
.azure-pipelines
.github
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Programs
Python
Tools
m4
.gitattributes -rw-r--r-- 1.8 KB
.gitignore -rw-r--r-- 1.8 KB
.travis.yml -rw-r--r-- 8.3 KB
CODE_OF_CONDUCT.md -rw-r--r-- 630 bytes
LICENSE -rw-r--r-- 13.6 KB
Makefile.pre.in -rw-r--r-- 68.9 KB
README.rst -rw-r--r-- 9.9 KB
aclocal.m4 -rw-r--r-- 13.1 KB
config.guess -rwxr-xr-x 43.1 KB
config.sub -rwxr-xr-x 35.4 KB
configure -rwxr-xr-x 499.6 KB
configure.ac -rw-r--r-- 168.7 KB
install-sh -rwxr-xr-x 15.0 KB
netlify.toml -rw-r--r-- 82 bytes
pyconfig.h.in -rw-r--r-- 44.4 KB
setup.py -rw-r--r-- 108.5 KB

README.rst

back to top