summaryrefslogtreecommitdiff
path: root/giscanner/ast.py
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2013-02-03 10:07:23 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2013-02-07 04:29:15 -0500
commit71bc26058124b2b9f2e283eeb07fae5eb3e52710 (patch)
treedcaa34d53bfb63887914022d8c0ab4efe9266f6c /giscanner/ast.py
parentd06a453042dfc21a5bfc99f9c770d6cdfaf86939 (diff)
downloadgobject-introspection-71bc26058124b2b9f2e283eeb07fae5eb3e52710.tar.gz
ast: Add a quick __repr__ to Field and Member
Nothing too specific, just something to help with debugging. https://bugzilla.gnome.org/show_bug.cgi?id=693098
Diffstat (limited to 'giscanner/ast.py')
-rw-r--r--giscanner/ast.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/giscanner/ast.py b/giscanner/ast.py
index aae9ee2e..f3639fe6 100644
--- a/giscanner/ast.py
+++ b/giscanner/ast.py
@@ -824,6 +824,8 @@ class Member(Annotated):
def __cmp__(self, other):
return cmp(self.name, other.name)
+ def __repr__(self):
+ return '%s(%r)' % (self.__class__.__name__, self.name)
class Compound(Node, Registered):
@@ -879,6 +881,9 @@ class Field(Annotated):
def __cmp__(self, other):
return cmp(self.name, other.name)
+ def __repr__(self):
+ return '%s(%r)' % (self.__class__.__name__, self.name)
+
class Record(Compound):