diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2020-11-07 12:35:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-07 12:35:17 (GMT) |
commit | 8805a4dad201473599416b2c265802b8885f69b8 (patch) | |
tree | 5d1c8947ac9733025aaa1cb58b62625ac4a6736f /Misc/NEWS.d/next/Core and Builtins | |
parent | ee2549c2ba8bae00f2b2fea8a39c6dfbd1d06520 (diff) | |
download | cpython-8805a4dad201473599416b2c265802b8885f69b8.zip cpython-8805a4dad201473599416b2c265802b8885f69b8.tar.gz cpython-8805a4dad201473599416b2c265802b8885f69b8.tar.bz2 |
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
Diffstat (limited to 'Misc/NEWS.d/next/Core and Builtins')
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2020-11-07-21-02-05.bpo-42282.M1W4Wj.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-11-07-21-02-05.bpo-42282.M1W4Wj.rst b/Misc/NEWS.d/next/Core and Builtins/2020-11-07-21-02-05.bpo-42282.M1W4Wj.rst new file mode 100644 index 0000000..74f5c33 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-11-07-21-02-05.bpo-42282.M1W4Wj.rst @@ -0,0 +1,3 @@ +Optimise constant subexpressions that appear as part of named expressions +(previously the AST optimiser did not descend into named expressions). +Patch by Nick Coghlan. |