You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
iffpisNone:
fp=sys.stdin
So if you invoke cgi.parse() (which means fp is None) it will be replaced with sys.stdin.
Activity
xwhhsprings commentedon Jul 13, 2015
https://docs.python.org/2/library/cgi.html#cgi.parse
(the file defaults to
sys.stdinand environmentdefaults 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.
berkerpeksag commentedon Aug 6, 2016
Thanks for the report!
The default values of fp and environ parameters are already documented in the function signature in Python 3:
In Python 2, the function signature is:
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:So if you invoke cgi.parse() (which means fp is None) it will be replaced with sys.stdin.