[Pyrex] Same type does not resolve to itself when coming in through different .pxd files

Dan Gindikin dg at pnylab.com
Wed Nov 21 14:26:54 CET 2007


> Sorry, I misread what you had there. Can you send it again?

Here it is, below. Incidentally I've gotten around this just fine, so please 
don't spend time on this if you've got better things to do...

I tried it with 0.9.5.1a and 0.9.6.3, both give "main.pyx:4:31: Expected ')'".

mymodule.pxd
     ctypedef struct F:
         int i

     cdef class base:
         cdef void func(self, F x)

mymodule.pyx
     cdef class base:
         cdef void func(self, F x):
             pass

main.pyx
     cimport mymodule

     cdef class derived(mymodule.base):
         cdef void func(self, F x):
             pass

run.sh
     #!/bin/sh

     #cmd="python Pyrex-0.9.5.1a/pyrexc.py"
     cmd="python Pyrex-0.9.6.3/pyrexc.py"

     $cmd mymodule.pyx    # runs fine
     $cmd main.pyx        # generates error "main.pyx:4:31: Expected ')'"

-- 
Dan



More information about the Pyrex mailing list