[Python-3000] C API for ints and strings (original) (raw)

Jim Jewett jimjjewett at gmail.com
Mon Sep 10 03:27:36 CEST 2007


On 9/9/07, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:

I think it's just trying to say dynamic rather than static ... library can be updated just by replacing a file, ...

So Windows DLLs qualify, as far as I can see.

How many external library calls would need to be resolved at runtime for the following code?

for x in range(N):

x = 0
while x < N:   # Would this comparison be external?
    x +=1        # And this incf?

If python handled small ints itself, and only farmed out the "large" ones, I think the situation would be worse than today, as extensions would still need to support two forms of integer, but they wouldn't even know which was going to be used for a given numeric value. (Unless GMP were modified to return the python version for small ones... in which case we have a fork.) And since we would still have the object headers of python, I suspect it still wouldn't be as simple as just using GMP routines.

-jJ



More information about the Python-3000 mailing list