projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51ac89e
)
little tweak for looking up node children
author
Stefan Behnel
<scoder@users.berlios.de>
Sat, 20 Dec 2008 20:10:02 +0000
(21:10 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Sat, 20 Dec 2008 20:10:02 +0000
(21:10 +0100)
Cython/Compiler/ExprNodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ExprNodes.py
b/Cython/Compiler/ExprNodes.py
index 7db0030f34f2da596709f8398935008f649b7504..5c44f7d8ab18e960d0c4275ee39abea30eda5a92 100644
(file)
--- a/
Cython/Compiler/ExprNodes.py
+++ b/
Cython/Compiler/ExprNodes.py
@@
-182,9
+182,13
@@
class ExprNode(Node):
constant_result = constant_value_not_set
- def get_child_attrs(self):
- return self.subexprs
- child_attrs = property(fget=get_child_attrs)
+ try:
+ _get_child_attrs = operator.attrgetter('subexprs')
+ except AttributeError:
+ # Python 2.3
+ def _get_child_attrs(self):
+ return self.subexprs
+ child_attrs = property(fget=_get_child_attrs)
def not_implemented(self, method_name):
print_call_chain(method_name, "not implemented") ###