def getPublicTypeMembers(type_, onlyValues=False):
 for (name, value) in inspect.getmembers(type_):
  if (not name.startswith('__')):
   if (not onlyValues):
    (yield (name, value))
   else:
    (yield value)

def getPublicTypeMembers ( type_ , onlyValues = False ) : for ( name , value ) in inspect . getmembers ( type_ ) : if ( not name . startswith ( '__' ) ) : if ( not onlyValues ) : ( yield ( name , value ) ) else : ( yield value )
useful for getting members from types .