Message149179
| Author |
rhettinger |
| Recipients |
rhettinger |
| Date |
2011年12月10日.18:49:54 |
| SpamBayes Score |
0.002597893 |
| Marked as misclassified |
No |
| Message-id |
<1323542995.09.0.555276242173.issue13573@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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__. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年12月10日 18:49:55 | rhettinger | set | recipients:
+ rhettinger |
| 2011年12月10日 18:49:55 | rhettinger | set | messageid: <1323542995.09.0.555276242173.issue13573@psf.upfronthosting.co.za> |
| 2011年12月10日 18:49:54 | rhettinger | link | issue13573 messages |
| 2011年12月10日 18:49:54 | rhettinger | create |
|