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