Greg Ewing wrote:

> When a module cimports an extension type from another
> module, code is generated to import the type object at
> run time. To do this, the Pyrex compiler needs to know
> where the other module is in the module namespace. If
> it gets moved somewhere else, the import will fail.

Yes, and this is how Python behaves. A module which imports a sub-module
needs to know how to get it.

So having "cimport pkg.foo" that will be translated to "import pkg.foo" is
normal.

My request is different: I would remove the constraint to fix modules'
location (not the sub-modules they eventually import) at compile time.

So when we compile foo.pyx, we don't have to inform Pyrex that foo.pyd will
be in pkg.

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

Reply via email to