Skip to content

Conversation

@brandtbucher
Copy link
Member

@brandtbucher brandtbucher commented Jan 31, 2022

Also, fix test_pack_unpack.

https://bugs.python.org/issue46528

Copy link
Member

@markshannon markshannon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit about continue vs break. Otherwise LGTM.

inst->i_opcode = NOP;
bb->b_instr[i+1].i_opcode = NOP;
break;
continue;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change this? Aren't they equivalent.
Having a continue here distracts from the flow of the code, as it is not the normal way to end a case and increases cognitive load (at least it did for me).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They’re not quite equivalent: note that I also removed the break on old line 8675.

Previously, values other than 1, 2, or 3 wouldn’t get a chance to hit fold_tuple_on_constants. Now they do.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM then.

@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

And if you don't make the requested changes, you will be poked with soft cushions!

@brandtbucher brandtbucher merged commit a0e55a5 into python:main Feb 1, 2022
@brandtbucher brandtbucher deleted the swap-cleanup branch July 21, 2022 20:17
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.

4 participants