minor yielding

This commit is contained in:
Miroslav Stampar 2011-05-16 20:14:10 +00:00
parent a5ad4621c9
commit dfe81cc66f

View File

@ -2016,16 +2016,12 @@ def getPublicTypeMembers(type_, onlyValues=False):
Useful for getting members from types (e.g. in enums)
"""
retVal = []
for name, value in inspect.getmembers(type_):
if not name.startswith('__'):
if not onlyValues:
retVal.append((name, value))
yield (name, value)
else:
retVal.append(value)
return retVal
yield value
def enumValueToNameLookup(type_, value_):
"""