This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: please sync cgi.parse document
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.4
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: berker.peksag, docs@python, xwhhsprings
Priority: normal Keywords:

Created on 2015-07-13 03:19 by xwhhsprings, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg246680 - (view) Author: hiroaki itoh (xwhhsprings) Date: 2015-07-13 03:19
  (the file defaults to ``sys.stdin`` and environment
   defaults to ``os.environ``)
  (the file defaults to ``sys.stdin``)

maby this fix had applied only to python2 branch, so please update to py3 also.
msg272096 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-08-06 11:47
Thanks for the report!

The default values of fp and environ parameters are already documented in the function signature in Python 3:

    cgi.parse(fp=None, environ=os.environ, keep_blank_values=False, strict_parsing=False)

In Python 2, the function signature is:

    cgi.parse(fp[, environ[, keep_blank_values[, strict_parsing]]])

Since the default values cannot be documented in the latter form, we need to specify them separately in plain text.

The reason why "(the file defaults to ``sys.stdin``)" is still in Python 3 documentation is because of the following two lines in cgi.parse() implementation:

    if fp is None:
        fp = sys.stdin

So if you invoke cgi.parse() (which means fp is None) it will be replaced with sys.stdin.
Date User Action Args
2022-04-11 14:58:18adminsetgithub: 68814
2016-08-06 11:47:16berker.peksagsetstatus: open -> closed
resolution: not a bug
messages: + msg272096

stage: resolved
2015-07-16 02:45:11berker.peksagsetnosy: + berker.peksag
2015-07-13 03:19:08xwhhspringscreate