diff options
Diffstat (limited to 'Lib/formatter.py')
-rw-r--r-- | Lib/formatter.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/formatter.py b/Lib/formatter.py index 75f4718..ccbbdf1 100644 --- a/Lib/formatter.py +++ b/Lib/formatter.py @@ -38,7 +38,7 @@ class NullFormatter: """ def __init__(self, writer=None): - if not writer: + if writer is None: writer = NullWriter() self.writer = writer def end_paragraph(self, blankline): pass @@ -433,7 +433,7 @@ class DumbWriter(NullWriter): def test(file = None): w = DumbWriter() f = AbstractFormatter(w) - if file: + if file is not None: fp = open(file) elif sys.argv[1:]: fp = open(sys.argv[1]) |