Skip to content

bpo-42899: Only eliminate jumps to successor block if jump is unconditional.#24417

Merged
markshannon merged 1 commit into
python:masterfrom
markshannon:only-eliminate-repeated-tests
Feb 2, 2021
Merged

bpo-42899: Only eliminate jumps to successor block if jump is unconditional.#24417
markshannon merged 1 commit into
python:masterfrom
markshannon:only-eliminate-repeated-tests

Conversation

@markshannon

@markshannon markshannon commented Feb 2, 2021

Copy link
Copy Markdown
Member

Prevents elimination of sole test of value in statements like:

   if x or True: ...

Skipping NEWS as this reverts behavior to that of 3.9 and earlier alphas.

https://bugs.python.org/issue42899

* Prevents elimination of sole test of value in statements like:
   if x or True: ...
@markshannon markshannon merged commit 802b645 into python:master Feb 2, 2021
@markshannon markshannon deleted the only-eliminate-repeated-tests branch February 2, 2021 14:59
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
…thonGH-24417)

* Prevents elimination of the sole test of a value in statements like:
   if x or True: ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants