New submission from Raymond Hettinger <raymond.hettin...@gmail.com>:

The csv.writer needs a special case for floats to print them to full precision. 
 See http://stackoverflow.com/a/8455313/1001643

In Py2.7, the csv.writer converts floats to strings using str().  This will 
store 1323494016.8556759 as '1323494016.86' and unnecessarily throw away 
precision.

In Py3.2, this isn't a problem because float.__str__ now returns full 
precision, the same a float.__repr__.

----------
assignee: rhettinger
messages: 149179
nosy: rhettinger
priority: normal
severity: normal
status: open
title: csv.writer uses str() for floats instead of repr()
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13573>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to