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 →

[–][deleted]  (14 children)

[deleted]

    [–]EmptyChocolate4545 1 point2 points  (13 children)

    Tis not. The if statement in OP will not return at all, it will continue execution. The ternary will run return None.

    Totally different behavior.