On 9/10/07, David Harvey <[EMAIL PROTECTED]> wrote:
> I'm not too comfortable with this suggestion... it's too specific to
> integer arguments.
>
> When someone calls e.g. binomial(x, y), is it possible to make that
> call go directly to cython? We can't avoid the initial "binomial"
> name lookup, that's fine with me, but is it possible to make that
> call land directly in some function
>
> cdef binomial_cython(x, m):
>         ...
>

Sure, if we could have module scope methods in Cython, we could
just do

cdef binomial(x, m):
    ... if should use Python call slow version...
    else
       do fast version.

Actually, I think when Cython merged in the lxml fork of Pyrex, we got
exactly that functionality (module-level cdef'd methods).  Robert Bradshaw
could probably confirm this.  (I should, but I have to run right now.)

william

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to