From: Raymond Hettinger Date: Fri, 31 May 2002 23:54:44 +0000 (+0000) Subject: Use is None rather than general boolean X-Git-Tag: v2.3c1~5533 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a144900b861be806290e3124988c6f9c13c0f1b6;p=thirdparty%2FPython%2Fcpython.git Use is None rather than general boolean --- diff --git a/Lib/cgi.py b/Lib/cgi.py index a7ad5bf01f3f..14ebeb966f79 100755 --- a/Lib/cgi.py +++ b/Lib/cgi.py @@ -128,7 +128,7 @@ def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0): If false (the default), errors are silently ignored. If true, errors raise a ValueError exception. """ - if not fp: + if fp is None: fp = sys.stdin if not environ.has_key('REQUEST_METHOD'): environ['REQUEST_METHOD'] = 'GET' # For testing stand-alone