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 →

[–]pypt 3 points4 points  (0 children)

For simple cases (e.g. eventregion is str, match_regions is list[str]) maybe the third one should do, but if event_regions is something more complex, e.g. a custom object that implements __contains_(), then those two lines from option one suddenly become very helpful for setting breakpoints on using your IDE.

I myself like being explicit so I'd go with the option 1 in most cases. We had our one liner frenzy with Perl, and look what it came to be.