[docs] Update cgi module doc (issue 11352)

berker.peksag at gmail.com berker.peksag at gmail.com
Wed Mar 19 07:45:59 CET 2014


http://bugs.python.org/review/11352/diff/4862/Doc/library/cgi.rst
File Doc/library/cgi.rst (left):

http://bugs.python.org/review/11352/diff/4862/Doc/library/cgi.rst#oldcode255
Doc/library/cgi.rst:255: 
It would be great to add a complete working example to end of the
documentaton.

http://bugs.python.org/review/11352/diff/4862/Doc/library/cgi.rst
File Doc/library/cgi.rst (right):

http://bugs.python.org/review/11352/diff/4862/Doc/library/cgi.rst#newcode90
Doc/library/cgi.rst:90: .. class::
FieldStorage([encoding[,errors[,keep_blank_values]]])
Nit: Please add a space after commas.

http://bugs.python.org/review/11352/diff/4862/Doc/library/cgi.rst#newcode99
Doc/library/cgi.rst:99: is usually contained in the META tag in the HEAD
section of the HTML
META tag -> ``<meta>`` element

http://bugs.python.org/review/11352/diff/4862/Doc/library/cgi.rst#newcode99
Doc/library/cgi.rst:99: is usually contained in the META tag in the HEAD
section of the HTML
I would drop the "in the HEAD section" part.

http://bugs.python.org/review/11352/diff/4862/Doc/library/cgi.rst#newcode101
Doc/library/cgi.rst:101: argument indicates how to manage encoding
errors (see the :mod:`str`
You could add a link to
http://docs.python.org/3.4/library/stdtypes.html#str.encode or
http://docs.python.org/3.4/library/codecs.html#codec-base-classes

http://bugs.python.org/review/11352/diff/4862/Doc/library/cgi.rst#newcode105
Doc/library/cgi.rst:105: in the dictionary; to keep such values, provide
a true value for the
true -> ``True``

http://bugs.python.org/review/11352/diff/4862/Doc/library/cgi.rst#newcode110
Doc/library/cgi.rst:110: form field name to an object that can be :
Remove the space before the colon.

http://bugs.python.org/review/11352/diff/4862/Doc/library/cgi.rst#newcode112
Doc/library/cgi.rst:112: * another instance of :class:`FieldStorage` for
data sent in the body of a
I would remove the indentation here. It's looks a bit ugly in the HTML
version of the document.

http://bugs.python.org/review/11352/diff/4862/Doc/library/cgi.rst#newcode122
Doc/library/cgi.rst:122: A form submitted via POST that also has a query
string will contain both
"via POST request"?

http://bugs.python.org/review/11352/diff/4862/Doc/library/cgi.rst#newcode137
Doc/library/cgi.rst:137: Returns the value for the specified field name
; the optional argument
Returns -> Return

http://bugs.python.org/review/11352/diff/4862/Doc/library/cgi.rst#newcode137
Doc/library/cgi.rst:137: Returns the value for the specified field name
; the optional argument
"field name ;" -> field *name*;

http://bugs.python.org/review/11352/diff/4862/Doc/library/cgi.rst#newcode138
Doc/library/cgi.rst:138: *default* is returned if the requested name is
not present.
*name*

http://bugs.python.org/review/11352/diff/4862/Doc/library/cgi.rst#newcode157
Doc/library/cgi.rst:157: of the field
Needs a dot.

http://bugs.python.org/review/11352/diff/4862/Doc/library/cgi.rst#newcode164
Doc/library/cgi.rst:164: checkboxes with the same name::
I would use ``.. code-block:: html`` here.

http://bugs.python.org/review/11352/diff/4862/Doc/library/cgi.rst#newcode166
Doc/library/cgi.rst:166: <input type="checkbox" name="item" value="1" />
"/>" is not the best practice in HTML 5 these days.

http://bugs.python.org/review/11352/diff/4862/Doc/library/cgi.rst#newcode182
Doc/library/cgi.rst:182: .. method:: FieldStorage.getfirst(name,
default=None)
[, default]

http://bugs.python.org/review/11352/


More information about the docs mailing list