diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2019-06-14 05:54:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-14 05:54:53 (GMT) |
commit | 05f831865545b08c9a21cfb7773af58b76ec64cb (patch) | |
tree | 439a8f94ee9aca75bf386902ace8b04eaa8fa0e9 /Misc | |
parent | d0eeb936d8daf05d7d89f6935e3f4c0dee49c5be (diff) | |
download | cpython-05f831865545b08c9a21cfb7773af58b76ec64cb.zip cpython-05f831865545b08c9a21cfb7773af58b76ec64cb.tar.gz cpython-05f831865545b08c9a21cfb7773af58b76ec64cb.tar.bz2 |
bpo-37269: Correctly optimise conditionals with constant booleans (GH-14071)
Fix a regression introduced by af8646c8054d0f4180a2013383039b6a472f9698 that was causing code of the form:
if True and False:
do_something()
to be optimized incorrectly, eliminating the block.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2019-06-14-06-32-33.bpo-37269.SjVVAe.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-06-14-06-32-33.bpo-37269.SjVVAe.rst b/Misc/NEWS.d/next/Core and Builtins/2019-06-14-06-32-33.bpo-37269.SjVVAe.rst new file mode 100644 index 0000000..b9b7906 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2019-06-14-06-32-33.bpo-37269.SjVVAe.rst @@ -0,0 +1,2 @@ +Fix a bug in the peephole optimizer that was not treating correctly constant +conditions with binary operators. Patch by Pablo Galindo. |