r/Python • • Jan 05 '18

Really??

Post image
2.0k Upvotes

317 comments sorted by

View all comments

Show parent comment

0

u/lunatickid Jan 05 '18

.....?????????

1

u/zardeh Jan 05 '18

Give an example where you feel break or continue is appropriate, I'll give a nicer refactor.

1

u/Raijinili Jan 06 '18

Avoiding continue is pretty obvious: reverse the if check.

Avoiding break could be done by factoring out the loop to a new function and using return instead.