Kaydet (Commit) a144900b authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Use is None rather than general boolean

üst c0418609
...@@ -128,7 +128,7 @@ def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0): ...@@ -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 false (the default), errors are silently ignored.
If true, errors raise a ValueError exception. If true, errors raise a ValueError exception.
""" """
if not fp: if fp is None:
fp = sys.stdin fp = sys.stdin
if not environ.has_key('REQUEST_METHOD'): if not environ.has_key('REQUEST_METHOD'):
environ['REQUEST_METHOD'] = 'GET' # For testing stand-alone environ['REQUEST_METHOD'] = 'GET' # For testing stand-alone
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment