[Python-checkins] cpython (2.7): Issue 13573: Document that csv.writer uses str() for floats instead of repr().

raymond.hettinger python-checkins at python.org
Sun Feb 28 02:35:01 EST 2016


https://hg.python.org/cpython/rev/d3ac0214b7b8
changeset:   100362:d3ac0214b7b8
branch:      2.7
parent:      100359:fca9f02e10e5
user:        Raymond Hettinger <python at rcn.com>
date:        Sat Feb 27 23:34:54 2016 -0800
summary:
  Issue 13573: Document that csv.writer uses str() for floats instead of repr().

files:
  Doc/library/csv.rst |  1 +
  1 files changed, 1 insertions(+), 0 deletions(-)


diff --git a/Doc/library/csv.rst b/Doc/library/csv.rst
--- a/Doc/library/csv.rst
+++ b/Doc/library/csv.rst
@@ -112,6 +112,7 @@
    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::

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list