Honeycombs/Python: Difference between revisions

m
Usually quicker to set the attributes once rather than look them up with custom function per access
mNo edit summary
m (Usually quicker to set the attributes once rather than look them up with custom function per access)
Line 81:
str(mandatory_arguments))
self.kwargs = kwargs
for kv in kwargs:
return setattr(self.kwargs[item],*kv)
 
def __repr__(self):
return self.__class__.__name__+'(**'+pprint.pformat(self.kwargs)+')'
 
def __getattr__(self,item):
try:
return self.kwargs[item]
except KeyError:
raise AttributeError(item)
 
class Ngon(Base):
Anonymous user