From eac92b53543c0e1710a58dcd37f476d0a8265c09 Mon Sep 17 00:00:00 2001 From: "Martin A. Brown" Date: Fri, 26 Feb 2016 23:18:50 -0800 Subject: [PATCH] add the document stem to the __repr__ --- tldp/doctypes/common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tldp/doctypes/common.py b/tldp/doctypes/common.py index f8f17ca..8e2f300 100644 --- a/tldp/doctypes/common.py +++ b/tldp/doctypes/common.py @@ -60,6 +60,9 @@ class SignatureChecker(object): class BaseDoctype(object): + def __repr__(self): + return '<%s:%s>' % (self.__class__.__name__, self.source.stem,) + def __init__(self, *args, **kwargs): self.source = kwargs.get('source', None) self.output = kwargs.get('output', None)