[Cython] remaining Pyrex changes

Gary Furnish gfurnish at gfurnish.net
Sun Jun 8 02:48:18 CEST 2008


Classes already get forward declared; we thus just essentially run a
dependency sorting algorithm on the classes to make sure they are
output in the correct order and this gives us circular imports in pxd
files.

On Sat, Jun 7, 2008 at 5:31 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Robert Bradshaw wrote:
>
>> In a.pyx you can do "from b cimport B" and from b.pyx you can do
>> "from a cimport A" without any problems.
>
> There's never been any problem with that in Pyrex, as
> far as I know.
>
> The problems occur when .pxd files cimport from each
> other, not .pyx files. That's what the recently
> added forward declaration features are addressing.
>
> Does Cython have a different way of handling circular
> cimports among .pxd files? If so, how does it work?
>
> --
> Greg
> _______________________________________________
> Cython-dev mailing list
> Cython-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/cython-dev
>


More information about the Cython-dev mailing list