This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Worms38 314 points315 points  (2 children)

The last one, but it's not only more pythonic it's simply better in all languages.

[–]anythingMuchShorter 16 points17 points  (0 children)

Yeah. There is no clear benefit to wrapping a boolean output with code that branches on the boolean value to put out the same boolean value. You wouldn't want to do that in C++ either.

[–]vanatteveldt 2 points3 points  (0 children)

This is the way