Sturla Molden wrote:

> As I see it,
> 
>     cdef int a, b, c
> 
> is a request to "step into C" when using these variables.

How about this:

1) By default, all operators have C semantics when
    applied to C data types.

2) To get Python semantics for / and %, put this at
    the top of the module:

      from __python__ import idiv, imod

3) You are allowed to feed a ".py" file directly to
    Cython, in which case it is compiled as though it
    begins with an implicit

      from __python__ import *

This mechanism could be extended to handle any other
areas where there is conflicting desire for C and
Python compatibility.

-- 
Greg
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to