[issue24626] please sync cgi.parse document
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
New submission from hiroaki itoh: https://docs.python.org/2/library/cgi.html#cgi.parse (the file defaults to ``sys.stdin`` and environment defaults to ``os.environ``) https://docs.python.org/3/library/cgi.html#cgi.parse (the file defaults to ``sys.stdin``) maby this fix had applied only to python2 branch, so please update to py3 also. ---------- assignee: docs@python components: Documentation messages: 246680 nosy: docs@python, xwhhsprings priority: normal severity: normal status: open title: please sync cgi.parse document type: behavior versions: Python 3.4 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue24626> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Changes by Berker Peksag <berker.peksag@gmail.com>: ---------- nosy: +berker.peksag _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue24626> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Berker Peksag added the comment: 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. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue24626> _______________________________________
participants (2)
-
Berker Peksag
-
hiroaki itoh