]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-32856: Optimize the assignment idiom in comprehensions. (GH-16814)
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 12 Feb 2020 10:18:59 +0000 (12:18 +0200)
committerGitHub <noreply@github.com>
Wed, 12 Feb 2020 10:18:59 +0000 (12:18 +0200)
commit8c579b1cc86053473eb052b76327279476740c9b
treebc99d5f52e1330500216512d1064c2f341b64d89
parent0cc6b5e559b8303b18fdd56c2befd900fe7b5e35
bpo-32856: Optimize the assignment idiom in comprehensions. (GH-16814)

Now `for y in [expr]` in comprehensions is as fast as a simple
assignment `y = expr`.
Doc/whatsnew/3.9.rst
Lib/test/test_dictcomps.py
Lib/test/test_genexps.py
Lib/test/test_listcomps.py
Lib/test/test_peepholer.py
Lib/test/test_setcomps.py
Misc/NEWS.d/next/Core and Builtins/2018-02-16-10-44-24.bpo-32856.UjR8SD.rst [new file with mode: 0644]
Python/compile.c