Merge pull request #12082 from mgedmin/be-faster

Speed up execution
This commit is contained in:
Brian Coca 2015-08-25 10:04:43 -04:00
commit 079a1c843d

View file

@ -96,7 +96,7 @@ class Base:
@staticmethod @staticmethod
def _generic_g(prop_name, self): def _generic_g(prop_name, self):
method = "_get_attr_%s" % prop_name method = "_get_attr_%s" % prop_name
if method in dir(self): if hasattr(self, method):
return getattr(self, method)() return getattr(self, method)()
return self._attributes[prop_name] return self._attributes[prop_name]