[Python-Dev] Decimal(unicode)
Georg Brandl
g.brandl at gmx.net
Fri Mar 28 10:24:51 CET 2008
Mark Dickinson schrieb:
> On Thu, Mar 27, 2008 at 4:46 AM, Georg Brandl <g.brandl at gmx.net
> <mailto:g.brandl at gmx.net>> wrote:
>
>
> As Nick said, a drop-in replacement in C isn't feasible
>
> But probably users of decimal won't really care if they have to slightly
> adapt their code if they get the speed increase instead.
>
>
> Could you give me an example of the sort of adaptations that might be
> necessary, or the API changes that would be necessary to make a
> drop-in replacement possible?
>
> Are you just talking about things like removing the context argument
> from __add__ and friends, or is it more serious than this?
One thing Nick already said is the handling of signal traps via a
dict with class keys -- with that, it's necessary to check the dict
all the time. Having e.g. a method to set traps would enable the
implementation to work with a bit field.
There were some other things I can't remember right now, but this was
the most problematic one.
Georg
--
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.
More information about the Python-Dev
mailing list