The "Pythonic" way to check for a non-empty tuple is if my_tuple.
t = ()
if t: # Should be false (does not work)
if (): # Should be false (does not work, raises error - see issue #48)
if (1, 2): # Should be true (works, but see comment in issue #48)
Note that bool() evaluates tuples correctly in filbert; the issue seems to just be with conditionals.
The "Pythonic" way to check for a non-empty tuple is
if my_tuple
.Note that
bool()
evaluates tuples correctly in filbert; the issue seems to just be with conditionals.