diff options
author | Guido van Rossum <guido@python.org> | 1996-05-29 00:02:30 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-05-29 00:02:30 (GMT) |
commit | 3672aa2dcdd8898ff520aa3885f8444ac73a2b2c (patch) | |
tree | ed1497a63baf1f327cc4ab8462d98725c179c456 /Lib | |
parent | 3fd32ecd9232fcb041b9f1f7a19a1e7e65cf11a0 (diff) | |
download | cpython-3672aa2dcdd8898ff520aa3885f8444ac73a2b2c.zip cpython-3672aa2dcdd8898ff520aa3885f8444ac73a2b2c.tar.gz cpython-3672aa2dcdd8898ff520aa3885f8444ac73a2b2c.tar.bz2 |
change DumbWriter to derive from NullWriter
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/formatter.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/formatter.py b/Lib/formatter.py index 985f4fb..0266379 100644 --- a/Lib/formatter.py +++ b/Lib/formatter.py @@ -262,6 +262,7 @@ class AbstractFormatter: class NullWriter: """Minimal writer interface to use in testing. """ + def __init__(self): pass def new_alignment(self, align): pass def new_font(self, font): pass def new_margin(self, margin, level): pass @@ -275,7 +276,7 @@ class NullWriter: def send_literal_data(self, data): pass -class AbstractWriter: +class AbstractWriter(NullWriter): def __init__(self): pass @@ -314,12 +315,12 @@ class AbstractWriter: print "send_literal_data(%s)" % `data` -class DumbWriter(AbstractWriter): +class DumbWriter(NullWriter): def __init__(self, file=None, maxcol=72): self.file = file or sys.stdout self.maxcol = maxcol - AbstractWriter.__init__(self) + NullWriter.__init__(self) self.reset() def reset(self): |