◐ Shell
clean mode source ↗

Message 126903 - Python tracker

Looking at the csv.rst file I see this statement early in the py3k
docs:

  If *csvfile* is a file object, it should be opened with ``newline=''``.

There is also a footnote about the consequences of leaving it out:

  .. [#] If ``newline=''`` is not specified, newlines embedded inside quoted fields
   will not be interpreted correctly.  It should always be safe to specify
   ``newline=''``, since the csv module does its own universal newline handling
   on input.

Finally, the examples all use "newline=''".  I see two things to change
in the docs:

  * Replace "should" with "must" in the first quoted sentence above.
  * Add that sentence to the documentation for the csv.writer()
    function.