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.

classification
Title: Small problems with the csv module's documentation
Type: Stage:
Components: Documentation Versions: Python 2.3
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: skip.montanaro Nosy List: frougon, rhettinger, rphilips, skip.montanaro
Priority: normal Keywords:

Created on 2003-08-30 18:07 by frougon, last changed 2022-04-10 16:10 by admin. This issue is now closed.

Messages (4)
msg18019 - (view) Author: Florent Rougon (frougon) Date: 2003-08-30 18:07
The csv module's documentation in python 2.3 has the
following (not
severe) problems:

1. http://www.python.org/doc/current/lib/node545.html
    ("Modules Contents")

    In addition to the problems mentioned in bug #792558
    (csv.DictReader parms inconsistent with docs),
there is a
    repetition and a typo in the doc for csv.DictReader:

      If the row read has fewer fields than the
fieldnames sequence, the
      value of restval will be used as the default
value. [...] If the
      row read has fewer fields than the fieldnames
sequence, the
      remaining keys take the value of the optiona
restval parameter

    (the typo is "optiona")

2.
http://www.python.org/doc/current/lib/csv-fmt-params.html
    ("Dialects and Formatting Parameters")

    The first paragraph contains:

      In addition to, or instead of, the dialect
parameter, the
      programmer can also specify individual formatting
parameters,
      which have the same names as the attributes
defined above for the
      Dialect class.

    but the "attributes defined above" are actually
defined below. Also,
    the documentation of the "quoting" paramteres contains:

      It can take on any of the QUOTE_* constants
defined below and
      defaults to QUOTE_MINIMAL.

    which is probably correct for text, DVI, PS and PDF
output formats
    but a bit confusing in the HTML output (and perhaps
Info, for the
    systems where it is generated--at least in Debian)
since the
    "QUOTE_* constants" are defined in another HTML
page (the "Modules
    Contents" page). I think a real cross-reference
(\ref or whatever it
    is with the python doc. document class) should be
introduced.

3. http://www.python.org/doc/current/lib/node547.html
   ("Reader Objects")

   The first sentence reads:

     Reader objects (DictReader instances and objects
returned by the
     reader()function) have the following public methods:

   where a space is missing between "reader()" and
"function".

4. The docs are not ideally explicit as for what types
of parameters are
   accepted by some functions, for instance the "row"
and "rows"
   parameters of writer objects in
   http://www.python.org/doc/current/lib/node548.html
("Writer
   Objects").

Thank you very much for your work on Python!
msg18020 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2003-08-31 05:46
Logged In: YES 
user_id=80475

Okay, fixed the first three.
Leaving the last one for Skip or Andrew.
msg18021 - (view) Author: Richard Philips (rphilips) Date: 2004-01-21 10:00
Logged In: YES 
user_id=723625

In the CSV module documentation "12.20.2 Dialects and
Formatting Parameters " there is a small typo:
"doubledd"
msg18022 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2004-01-21 13:47
Logged In: YES 
user_id=44345

Fixed the extra "d" in libcsv.tex 1.11 & #4 in 1.12.
History
Date User Action Args
2022-04-10 16:10:54adminsetgithub: 39151
2003-08-30 18:07:37frougoncreate