diff options
author | Raymond Hettinger <python@rcn.com> | 2002-06-01 00:57:55 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2002-06-01 00:57:55 (GMT) |
commit | 0f4940c0a8d2ac66ccf90fb12739967915043406 (patch) | |
tree | bf41a9f6c5a0552cd04a7365fe32f67db26bc48f /Lib/dis.py | |
parent | 8989ea6ce1619890adc58778fb5516a36053cadb (diff) | |
download | cpython-0f4940c0a8d2ac66ccf90fb12739967915043406.zip cpython-0f4940c0a8d2ac66ccf90fb12739967915043406.tar.gz cpython-0f4940c0a8d2ac66ccf90fb12739967915043406.tar.bz2 |
Replaced boolean test with 'is None'
Diffstat (limited to 'Lib/dis.py')
-rw-r--r-- | Lib/dis.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -13,7 +13,7 @@ def dis(x=None): With no argument, disassemble the last traceback. """ - if not x: + if x is None: distb() return if type(x) is types.InstanceType: @@ -44,7 +44,7 @@ def dis(x=None): def distb(tb=None): """Disassemble a traceback (default: last traceback).""" - if not tb: + if tb is None: try: tb = sys.last_traceback except AttributeError: @@ -312,12 +312,12 @@ def _test(): fn = None else: fn = None - if not fn: + if fn is None: f = sys.stdin else: f = open(fn) source = f.read() - if fn: + if fn is not None: f.close() else: fn = "<stdin>" |