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
c-api
data
distributing
distutils
extending
faq
howto
includes
install
installing
library
reference
tools
tutorial
using
whatsnew
Makefile -rw-r--r-- 8.5 KB
README.rst -rw-r--r-- 4.6 KB
about.rst -rw-r--r-- 1.5 KB
bugs.rst -rw-r--r-- 4.7 KB
conf.py -rw-r--r-- 7.1 KB
contents.rst -rw-r--r-- 538 bytes
copyright.rst -rw-r--r-- 451 bytes
glossary.rst -rw-r--r-- 53.2 KB
license.rst -rw-r--r-- 46.5 KB
make.bat -rw-r--r-- 5.5 KB
requirements.txt -rw-r--r-- 381 bytes
runtime.txt -rw-r--r-- 3 bytes

README.rst

back to top