Skip to content

Commit

Permalink
Add provisions to set the (to be documented!) instance variable
Browse files Browse the repository at this point in the history
'writer' of the NullFormatter to the writter passed in, or to a
NullWriter if none (or None) is passed in.
  • Loading branch information
gvanrossum committed Oct 7, 1996
1 parent 36fc11e commit ccd8b19
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Lib/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@

class NullFormatter:

def __init__(self, writer): pass
def __init__(self, writer=None):
if not writer:
writer = NullWriter()
self.writer = writer
def end_paragraph(self, blankline): pass
def add_line_break(self): pass
def add_hor_rule(self, abswidth=None, percentwidth=1.0,
Expand Down

0 comments on commit ccd8b19

Please sign in to comment.