consider this:
valid = data and func(data)
In the cases where data
will be False
, will python still run the function on the right side of the and
condition? (it will error if run, so I'm trying to figure out if I need to check data
within func
or is the above code fine as is)