def isenumclass(x):
 if (enum is None):
  return False
 return issubclass(x, enum.Enum)

def isenumclass ( x ) : if ( enum is None ) : return False return issubclass ( x , enum . Enum )
check if the object is subclass of enum .