]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-42282: Fold constants inside named expressions (GH-23190)
authorNick Coghlan <ncoghlan@gmail.com>
Sat, 7 Nov 2020 12:35:17 +0000 (22:35 +1000)
committerGitHub <noreply@github.com>
Sat, 7 Nov 2020 12:35:17 +0000 (22:35 +1000)
commit8805a4dad201473599416b2c265802b8885f69b8
tree5d1c8947ac9733025aaa1cb58b62625ac4a6736f
parentee2549c2ba8bae00f2b2fea8a39c6dfbd1d06520
bpo-42282: Fold constants inside named expressions (GH-23190)

* The AST optimiser wasn't descending into named expressions, so
  any constant subexpressions weren't being folded at compile time
* Remove "default:" clauses inside the AST optimiser code to reduce the
  risk of similar bugs passing unnoticed in future compiler changes
Misc/NEWS.d/next/Core and Builtins/2020-11-07-21-02-05.bpo-42282.M1W4Wj.rst [new file with mode: 0644]
Python/ast_opt.c