From: Raymond Hettinger Date: Sun, 28 Feb 2016 07:34:54 +0000 (-0800) Subject: Issue 13573: Document that csv.writer uses str() for floats instead of repr(). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a3e8e5bc080fd37299dc0276d8efd5738b9e9ce;p=python Issue 13573: Document that csv.writer uses str() for floats instead of repr(). --- diff --git a/Doc/library/csv.rst b/Doc/library/csv.rst index d3d505e421..dbef60f0a6 100644 --- a/Doc/library/csv.rst +++ b/Doc/library/csv.rst @@ -112,6 +112,7 @@ The :mod:`csv` module defines the following functions: value :const:`None` is written as the empty string. While this isn't a reversible transformation, it makes it easier to dump SQL NULL data values to CSV files without preprocessing the data returned from a ``cursor.fetch*`` call. + Floats are stringified with :func:`repr` before being written. All other non-string data are stringified with :func:`str` before being written. A short usage example::