Kaydet (Commit) 5a3e8e5b authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Issue 13573: Document that csv.writer uses str() for floats instead of repr().

üst ef85a1ac
...@@ -112,6 +112,7 @@ The :mod:`csv` module defines the following functions: ...@@ -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 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 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. 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. All other non-string data are stringified with :func:`str` before being written.
A short usage example:: A short usage example::
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment