Re: force non-exponential representation for Decimal?

2009-12-23 Thread Mensanator
On Dec 23, 4:03 am, jh...@gmx.de wrote: > (cc-ing the list) > > > > Is there a convenient way to force a decimal.Decimal representation to > > not use exponential representation? > > > Which Python version are you using?  For Python 2.6 (and 3.1), the > > answer's yes.  For earlier Python verions,

Re: Re: force non-exponential representation for Decimal?

2009-12-23 Thread jholg
-- sorry if this comes out-of-thread-line but I forgot to enable mailing list delivery :-( -- > I can't help wondering what you're doing with numbers that small. > 2.34e-19 looks an awful lot like 0 for many practical purposes... Just an arbitrary example to show the behaviour. As I don't have

Re: force non-exponential representation for Decimal?

2009-12-23 Thread Mark Dickinson
On Dec 23, 10:03 am, jh...@gmx.de wrote: > (cc-ing the list) Thanks. Looks like I'm still having trouble distinguishing between 'Reply' and 'Reply to author'. I'll have to work on my reading abilities over the break... > > > Is there a convenient way to force a decimal.Decimal representation to

Re: force non-exponential representation for Decimal?

2009-12-23 Thread jholg
(cc-ing the list) > > Is there a convenient way to force a decimal.Decimal representation to > not use exponential representation? > > Which Python version are you using? For Python 2.6 (and 3.1), the > answer's yes. For earlier Python verions, I don't think so. In > Python 2.6, use new-style

Re: force non-exponential representation for Decimal?

2009-12-23 Thread Peter Otten
jh...@gmx.de wrote: > I need to convert Python decimal.Decimal data to the XMLSchema xs:decimal > datatype. This is reasonably straightforward, but there are some corner > cases. > > In particular, xs:decimal does not allow exponential notation like: > print Decimal('0.00234

force non-exponential representation for Decimal?

2009-12-23 Thread jholg
(re-posting this because of missing subject - sorry for the hassle) Hi, I need to convert Python decimal.Decimal data to the XMLSchema xs:decimal datatype. This is reasonably straightforward, but there are some corner cases. In particular, xs:decimal does not allow exponential notation like: >