summaryrefslogtreecommitdiffstats
path: root/Doc/library/cgi.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-04-05 22:20:44 (GMT)
committerGeorg Brandl <georg@python.org>2009-04-05 22:20:44 (GMT)
commit0d8f07305d7ddcf684c3db5680263c98cf70c067 (patch)
tree8862b638d9b3e98ce030044765e9231333821f94 /Doc/library/cgi.rst
parent889b0aa4506d5ea43985865a44562ebd39b3bf00 (diff)
downloadcpython-0d8f07305d7ddcf684c3db5680263c98cf70c067.zip
cpython-0d8f07305d7ddcf684c3db5680263c98cf70c067.tar.gz
cpython-0d8f07305d7ddcf684c3db5680263c98cf70c067.tar.bz2
Update signature style of optional arguments, part two.
Diffstat (limited to 'Doc/library/cgi.rst')
-rw-r--r--Doc/library/cgi.rst15
1 files changed, 7 insertions, 8 deletions
diff --git a/Doc/library/cgi.rst b/Doc/library/cgi.rst
index ad7d348..42acdcf 100644
--- a/Doc/library/cgi.rst
+++ b/Doc/library/cgi.rst
@@ -1,6 +1,5 @@
-
-:mod:`cgi` --- Common Gateway Interface support.
-================================================
+:mod:`cgi` --- Common Gateway Interface support
+===============================================
.. module:: cgi
:synopsis: Helpers for running Python scripts via the Common Gateway Interface.
@@ -220,7 +219,7 @@ A more convenient approach is to use the methods :meth:`getfirst` and
:meth:`getlist` provided by this higher level interface.
-.. method:: FieldStorage.getfirst(name[, default])
+.. method:: FieldStorage.getfirst(name, default=None)
This method always returns only one value associated with form field *name*.
The method returns only the first value in case that more values were posted
@@ -255,19 +254,19 @@ These are useful if you want more control, or if you want to employ some of the
algorithms implemented in this module in other circumstances.
-.. function:: parse(fp[, keep_blank_values[, strict_parsing]])
+.. function:: parse(fp=None, environ=os.environ, keep_blank_values=False, strict_parsing=False)
Parse a query in the environment or from a file (the file defaults to
``sys.stdin``). The *keep_blank_values* and *strict_parsing* parameters are
passed to :func:`urllib.parse.parse_qs` unchanged.
-.. function:: parse_qs(qs[, keep_blank_values[, strict_parsing]])
+.. function:: parse_qs(qs, keep_blank_values=False, strict_parsing=False)
This function is deprecated in this module. Use :func:`urllib.parse.parse_qs`
instead. It is maintained here only for backward compatibility.
-.. function:: parse_qsl(qs[, keep_blank_values[, strict_parsing]])
+.. function:: parse_qsl(qs, keep_blank_values=False, strict_parsing=False)
This function is deprecated in this module. Use :func:`urllib.parse.parse_qs`
instead. It is maintained here only for backward compatibility.
@@ -319,7 +318,7 @@ algorithms implemented in this module in other circumstances.
Print a list of useful (used by CGI) environment variables in HTML.
-.. function:: escape(s[, quote])
+.. function:: escape(s, quote=False)
Convert the characters ``'&'``, ``'<'`` and ``'>'`` in string *s* to HTML-safe
sequences. Use this if you need to display text that might contain such