[pypy-dev] Re: [pypy-svn] r16070 - pypy/dist/pypy/objspace/std

Eric van Riet Paap eric at vanrietpaap.nl
Mon Aug 15 10:35:16 CEST 2005


comments inline:

Christian Tismer wrote:

> ericvrp at codespeak.net wrote:
>
>> Author: ericvrp
>> Date: Sun Aug 14 21:33:03 2005
>> New Revision: 16070
>>
>> Modified:
>>    pypy/dist/pypy/objspace/std/strutil.py
>> Log:
>> Better to use math.log10(float) consistently. Backends (at least
>> llvm) will have no math.log10(int) implementation.
>
>
> That's correct in principle, but not the reasoning:
> The code is applevel and therefore allowed to be more sloppy.
> No backend will ever see it.

Because this is a function with suggested_primitive tag attached, the
backends will have to implement them.
If we do not use the parameter types consistently, the backends will
have to implement multiple versions.
The fact that this is applevel does not play a role here, as far as I
can see.

cheers
Eric


> The actual version is interp_string_to_float, and that had the
> correction.
>
> ciao - chris





More information about the Pypy-dev mailing list