diff options
author | Raymond Hettinger <python@rcn.com> | 2002-06-01 01:29:16 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2002-06-01 01:29:16 (GMT) |
commit | 094662a16542d1cc56713b35dde39089490dec35 (patch) | |
tree | eb433a4bebe8dc9eb28de9f7655f8fab24498a52 /Lib/formatter.py | |
parent | 0f4940c0a8d2ac66ccf90fb12739967915043406 (diff) | |
download | cpython-094662a16542d1cc56713b35dde39089490dec35.zip cpython-094662a16542d1cc56713b35dde39089490dec35.tar.gz cpython-094662a16542d1cc56713b35dde39089490dec35.tar.bz2 |
Replace boolean test with is None
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]) |