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 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

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: >

[no subject]

2009-12-22 Thread jholg
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: >>> print Decimal('0.002343000837483727772') 2.343

adding class functionality, nested scoping

2008-01-04 Thread jholg
Hi, regarding automatically adding functionality to a class (basically taken from the cookbook recipee) and Python's lexical nested scoping I have a question wrt this code: #- import types # minor variation on cookbook recipee def enhance_method(cls, methodname, replacement):

[dateutil] bug(s) in dateutil.parser /dateutil.tz

2007-04-05 Thread jholg
Hi all, I'm having some problems with python-datetutil (which is a very, very nice tool, btw). Anybody knows where to adress these other than here? I tried reaching the author but don't seem to get through. Anyhow: 1. There's a bug in dateutil.parser you run into when you try to use a custom p