def has_inherited_table(cls):
 for class_ in cls.__mro__[1:]:
  if (getattr(class_, '__table__', None) is not None):
   return True
 return False

def has_inherited_table ( cls ) : for class_ in cls . __mro__ [ 1 : ] : if ( getattr ( class_ , '__table__' , None ) is not None ) : return True return False
given a class .