[Pyrex] Bug in pyrex: difference in docstring contents prevents diagnosis of undeclared name and produces bad C code

Parzival Herzog parzp at shaw.ca
Sat Oct 16 17:53:14 CEST 2004


On October 16, 2004 03:02, Greg Ewing wrote:
> Yes, pysweph is cimporting itself in that situation.
> However, that shouldn't cause anything bad to happen;
> it should just provide another way of accessing the
> same namespace. I'll look into this.

I read the docs to mean that "cimport X" will find its definitions in
 "X.pxd", not "X.pyx". I had both "pysweph.pxd", and "pysweph.pyx" in my
 working directory; so was this ambiguity silently resolved to the .pyx file
 in preference to the .pxd file? I would expect preference the other way, but
 better still, an error if this situation exists, or better still, cimport
 imports _only_ files ending with ".pxd".

Self importing with cimport seems to me to be rather a contradictory idea,
given that declarations of C entities is implied (and I thought, expected,)
and the importing module is a pyrex module.

--
Parzival Herzog





More information about the Pyrex mailing list