Commit 82e44cb8 authored by Stefan Behnel's avatar Stefan Behnel

cleaned up some left-over Py2.3 code

parent 10b03f63
...@@ -4,12 +4,14 @@ ...@@ -4,12 +4,14 @@
# #
import cython import cython
cython.declare(re=object, Naming=object, Options=object, StringEncoding=object, cython.declare(os=object, re=object, operator=object,
Naming=object, Options=object, StringEncoding=object,
Utils=object, SourceDescriptor=object, StringIOTree=object, Utils=object, SourceDescriptor=object, StringIOTree=object,
DebugFlags=object, none_or_sub=object, basestring=object) DebugFlags=object, none_or_sub=object, basestring=object)
import os import os
import re import re
import operator
import Naming import Naming
import Options import Options
...@@ -1157,13 +1159,7 @@ class GlobalState(object): ...@@ -1157,13 +1159,7 @@ class GlobalState(object):
def funccontext_property(name): def funccontext_property(name):
try: attribute_of = operator.attrgetter(name)
import operator
attribute_of = operator.attrgetter(name)
except:
def attribute_of(o):
return getattr(o, name)
def get(self): def get(self):
return attribute_of(self.funcstate) return attribute_of(self.funcstate)
def set(self, value): def set(self, value):
......
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