Commit fc3d5fea authored by Stefan Behnel's avatar Stefan Behnel

reduce code-gen time spent in builtins

parent b5860e73
......@@ -723,8 +723,15 @@ class GlobalState(object):
def funccontext_property(name):
try:
import operator
attribute_of = operator.attrgetter(name)
except:
def attribute_of(o):
return getattr(o, name)
def get(self):
return getattr(self.funcstate, name)
return attribute_of(self.funcstate)
def set(self, value):
setattr(self.funcstate, name, value)
return property(get, set)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment