[Cython] Multiple cimports to same name?

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Aug 6 02:07:10 CEST 2008


Dag Sverre Seljebotn wrote:

> cimport python_int as a
> a.PyInt_Check(3)
> cimport python_dict as a
> 
> Apparently, only the first cimport is considered,

I would regard this as a bug -- it shouldn't be letting
you redeclare a that way.

I tried the following with Pyrex 0.9.8.4:

   cimport blarg as m
   cimport zax as m

and got

   /Users/greg/foo/foo.pyx:2:8: 'm' does not match previous declaration
   /Users/greg/foo/foo.pyx:1:8: Previous declaration is here

-- 
Greg


More information about the Cython-dev mailing list