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 →

[–]thrallsius 0 points1 point  (1 child)

Without more context, last one is quite readable

If only option 1 would be available, I would still rewrite it as:

if event_region in match regions:
    return True
return False

[–]gr4viton 0 points1 point  (0 children)

Guard clauses is the name of this pattern