diff options
author | Johan Dahlin <johan@gnome.org> | 2010-09-20 23:18:56 -0300 |
---|---|---|
committer | Johan Dahlin <johan@gnome.org> | 2010-09-20 23:33:22 -0300 |
commit | bb3563b89f79d5c95946de392ede907161fb416a (patch) | |
tree | 35f22e63b433e5eb9a0a4b0138150ff5c3f9bd72 | |
parent | e3cb73b0ceca999e7d5b94822b983eff3c61f4c7 (diff) | |
download | gobject-introspection-bb3563b89f79d5c95946de392ede907161fb416a.tar.gz |
[Message] Implement Position.__repr__
-rw-r--r-- | giscanner/message.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/giscanner/message.py b/giscanner/message.py index c6e2a392..4aa63f4f 100644 --- a/giscanner/message.py +++ b/giscanner/message.py @@ -43,6 +43,12 @@ class Position(object): return cmp((self.filename, self.line, self.column), (other.filename, other.line, other.column)) + def __repr__(self): + return '<Position %s:%d:%d>' % ( + os.path.basename(self.filename), + self.line or -1, + self.column or -1) + def format(self, cwd): filename = self.filename if filename.startswith(cwd): |