[Python-Dev] PEP for adding a decimal type to Python
Guido van Rossum
Fri, 27 Jul 2001 11:50:15 -0400
> > Funny, I had a similar idea today in the shower (always the best place
> > to think :-). I'm not sure exactly how it would work yet --
> > currently, literals are converted to values at compile-time, so the
> > registry would have to be available to the compiler, but the concept
> > seems to make more sense if it is available and changeable at runtime.
> True, but deferring the conversion to runtime (by e.g. using
> literal descriptors ;-) would cause a significant slowdown.
> So, I believe that the compiler would have be told before starting
> the compile process or within the process by looking at some magical
> constant/comment in the source code (I think that this ought to be
> a per-file overrideable setting, since some code may simply fail
> to work if it suddenly starts to work with different types).
This may be the first place where a 'directive' statement actually
makes sense to me.
> > Nevertheless, we should keep this in mind.
> I could reformat the above into a PEP or Michael could simply
> the idea as section to his PEP.
I'm not optimistic about Michael's PEP. He seems to insist on a total
separation between decimal and binary numbers that I don't believe can
work. I haven't replied to him yet because I can't explain it well
enough yet -- but I don't believe there's much of a future in his
--Guido van Rossum (home page: http://www.python.org/~guido/)