diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-02-03 10:07:23 -0500 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-02-07 04:29:15 -0500 |
commit | 71bc26058124b2b9f2e283eeb07fae5eb3e52710 (patch) | |
tree | dcaa34d53bfb63887914022d8c0ab4efe9266f6c /giscanner/ast.py | |
parent | d06a453042dfc21a5bfc99f9c770d6cdfaf86939 (diff) | |
download | gobject-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.py | 5 |
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): |