(x)
return True
Check if x is either empty or a tuple of (tuples of) empty things.
Check if x is either empty or a tuple of (tuples of) empty things.
Check if x is either empty or a tuple of ( tuples of ) empty things .
def _is_empty_tuple(x):
  """Check if x is either empty or a tuple of (tuples of) empty things."""
  if not isinstance(x, (list, tuple)):
    return False
  for y in x:
    if not _is_empty_tuple(y):
      return False
  return True
def _is_empty_tuple ( x ) : if not isinstance ( x , ( list , tuple ) ) : return False for y in x : if not _is_empty_tuple ( y ) : return False return True