Re: decimal by default

2006-06-29 Thread Alex Martelli
Daniel <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > What about: > > > > c = compile(thestring, thestring, '') > > > > cc = new.code( ...all args from c's attributes, except the 5th > > one, constants, which should instead be: > > decimal

Re: decimal by default

2006-06-29 Thread Daniel
Alex Martelli wrote: > What about: > > c = compile(thestring, thestring, '') > > cc = new.code( ...all args from c's attributes, except the 5th > one, constants, which should instead be: > decimalize(c.co_consts)...) Wow, what an elegant solution

Re: decimal by default

2006-06-28 Thread Alex Martelli
Daniel <[EMAIL PROTECTED]> wrote: ... > Ideally I'd like to have a way to tell the interpreter to use Decimal > by default instead of float (but only in the eval() calls). I > understand the performance implications and they are of no concern. I'm > also willi

decimal by default

2006-06-28 Thread Daniel
unk to make them evaluate correctly they are not nearly as recognizable (or easy to read) and the user is likely to think "but I didn't even write that expression...where is that Decimal('...') stuff coming from?" Ideally I'd like to have a way to tell the interpret