On Apr 23, 9:23 am, Phlip phlip2...@gmail.com wrote:
When I use the CSV library, with QUOTE_NONNUMERIC, and when I pass in
a Decimal() object, I must convert it to a string.
Why must you? What unwanted effect do you observe when you don't
convert it?
the search for an alternate CSV module,
On Apr 22, 5:03 pm, MRAB pyt...@mrabarnett.plus.com wrote:
It might be a stupid question, but have you tried passing in the
Decimal() object itself?
Yep. Nope. Might as well (we ain't working today).
But sorry, as usual, for my tone, and thanks all for playing!
--
On Apr 22, 6:15 pm, Jerry Hill malaclyp...@gmail.com wrote:
10,10.0,10.00,10
That's an int, a float, a Decimal and a string, all of which appear to
be formatted as I would expect.
When you point your finger 'cause your plan fell thru
you got three more fingers, pointing back at you! --Dire
On 4/22/10 6:23 PM, Phlip wrote:
Pythonistas:
This is not a question so much as registering a complaint.
When I use the CSV library, with QUOTE_NONNUMERIC, and when I pass in
a Decimal() object, I must convert it to a string. _Not_ a float,
because that might cause the rounding errors that
Phlip wrote:
Pythonistas:
This is not a question so much as registering a complaint.
When I use the CSV library, with QUOTE_NONNUMERIC, and when I pass in
a Decimal() object, I must convert it to a string. _Not_ a float,
because that might cause the rounding errors that Decimal() seeks to
On Thu, Apr 22, 2010 at 8:03 PM, MRAB pyt...@mrabarnett.plus.com wrote:
It might be a stupid question, but have you tried passing in the
Decimal() object itself?
MRAB's suggestion works for me in python 3.1.2:
import csv, io
from decimal import Decimal
d = Decimal(10.00)
o = io.StringIO()
w =