]> granicus.if.org Git - python/commitdiff
Replaced boolean test with is None
authorRaymond Hettinger <python@rcn.com>
Sat, 1 Jun 2002 03:06:31 +0000 (03:06 +0000)
committerRaymond Hettinger <python@rcn.com>
Sat, 1 Jun 2002 03:06:31 +0000 (03:06 +0000)
Lib/imaplib.py
Lib/imputil.py
Lib/inspect.py

index ef93f734bd091155bd9bd6770c83ae6570ccfeb8..3ec75a1997bb631e3ea6c6ea629e3b4cfdb86a48 100644 (file)
@@ -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'
index 65e799cd491e3c599d9a75a3047b91d52d52fc5e..d83b16e20fe50f84746950f2cd45950d2f1b3368 100644 (file)
@@ -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
index 2f9511a0eef1714b8522228c66b1d4a450513268..ecd3fc925dcc47e86c6f71c5bdd39e9306c6638e 100644 (file)
@@ -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, ', ') + ')'