summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2002-06-01 03:06:31 (GMT)
committerRaymond Hettinger <python@rcn.com>2002-06-01 03:06:31 (GMT)
commit936654bce0444cad8259a7585722dcb06a0f1ec8 (patch)
tree14e637264e48d13499484c7666fbfbf2d46eac8f /Lib
parent094662a16542d1cc56713b35dde39089490dec35 (diff)
downloadcpython-936654bce0444cad8259a7585722dcb06a0f1ec8.zip
cpython-936654bce0444cad8259a7585722dcb06a0f1ec8.tar.gz
cpython-936654bce0444cad8259a7585722dcb06a0f1ec8.tar.bz2
Replaced boolean test with is None
Diffstat (limited to 'Lib')
-rw-r--r--Lib/imaplib.py2
-rw-r--r--Lib/imputil.py2
-rw-r--r--Lib/inspect.py4
3 files changed, 4 insertions, 4 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py
index ef93f73..3ec75a1 100644
--- a/Lib/imaplib.py
+++ b/Lib/imaplib.py
@@ -539,7 +539,7 @@ class IMAP4:
# Mandated responses are ('FLAGS', 'EXISTS', 'RECENT', 'UIDVALIDITY')
self.untagged_responses = {} # Flush old responses.
self.is_readonly = readonly
- if readonly:
+ if readonly is not None:
name = 'EXAMINE'
else:
name = 'SELECT'
diff --git a/Lib/imputil.py b/Lib/imputil.py
index 65e799c..d83b16e 100644
--- a/Lib/imputil.py
+++ b/Lib/imputil.py
@@ -66,7 +66,7 @@ class ImportManager:
# This is the Importer that we use for grabbing stuff from the
# filesystem. It defines one more method (import_from_dir) for our use.
- if not fs_imp:
+ if fs_imp is None:
cls = self.clsFilesystemImporter or _FilesystemImporter
fs_imp = cls()
self.fs_imp = fs_imp
diff --git a/Lib/inspect.py b/Lib/inspect.py
index 2f9511a..ecd3fc9 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -665,9 +665,9 @@ def formatargspec(args, varargs=None, varkw=None, defaults=None,
if defaults and i >= firstdefault:
spec = spec + formatvalue(defaults[i - firstdefault])
specs.append(spec)
- if varargs:
+ if varargs is not None:
specs.append(formatvarargs(varargs))
- if varkw:
+ if varkw is not None:
specs.append(formatvarkw(varkw))
return '(' + string.join(specs, ', ') + ')'