summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJosh Blum2013-07-06 18:13:10 -0700
committerJosh Blum2013-07-06 18:13:10 -0700
commit2001959902f85723c289e3f942ec2e49954a04bc (patch)
tree162e91af1dff0250a51e1faa198033d5dc309e37 /include
parentc6f6b12bf8429325407ae76f7ead8d3d72232f99 (diff)
downloadsandhi-2001959902f85723c289e3f942ec2e49954a04bc.tar.gz
sandhi-2001959902f85723c289e3f942ec2e49954a04bc.tar.bz2
sandhi-2001959902f85723c289e3f942ec2e49954a04bc.zip
gras: getattr makes python so smart
Diffstat (limited to 'include')
-rw-r--r--include/gras/element.i3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/gras/element.i b/include/gras/element.i
index 38055a1..5857548 100644
--- a/include/gras/element.i
+++ b/include/gras/element.i
@@ -45,6 +45,9 @@ from PMC import *
pmcret = self._handle_call(key, pmcargs)
return pmcret()
+ def __getattr__(self, name):
+ return lambda *args: self.x(name, *args)
+
def __eq__(self, rhs):
if not isinstance(rhs, Element): return False
return self.equals(rhs)