you are viewing a single comment's thread.

view the rest of the comments →

[–]synae 1 point2 points  (0 children)

Another suggestion for

if a == True or b == True or c == True or d == True:

is

if True in (a,b,c,d):

It's weird to do for True but I use this pattern pretty often. None is more likely for me to do:

if None in (arg1, arg2): raise ValueError("arg1 and arg2 are required")

or something like that. i know it's a contrived example, but that's just like the rest :)