MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Python/comments/7oaay5/really/dsa5ox8/?context=3
r/Python • u/fabrikated • Jan 05 '18
317 comments sorted by
View all comments
Show parent comments
0
[deleted]
-1 u/zardeh Jan 05 '18 In general, I'd argue that break and continue are things that shouldn't ever appear in python code. I don't believe I've ever seen a situation that couldn't be more gracefully handled another way. 0 u/lunatickid Jan 05 '18 .....????????? 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.
-1
In general, I'd argue that break and continue are things that shouldn't ever appear in python code. I don't believe I've ever seen a situation that couldn't be more gracefully handled another way.
0 u/lunatickid Jan 05 '18 .....????????? 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.
.....?????????
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.
1
Avoiding continue is pretty obvious: reverse the if check.
continue
if
Avoiding break could be done by factoring out the loop to a new function and using return instead.
break
return
0
u/[deleted] Jan 05 '18
[deleted]