From bb3563b89f79d5c95946de392ede907161fb416a Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Mon, 20 Sep 2010 23:18:56 -0300 Subject: [PATCH] [Message] Implement Position.__repr__ --- giscanner/message.py | 6 ++++++ 1 file changed, 6 insertions(+) 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 '' % ( + os.path.basename(self.filename), + self.line or -1, + self.column or -1) + def format(self, cwd): filename = self.filename if filename.startswith(cwd): -- 2.34.1