[Pyrex] The necessity of .pxd files

Christopher Armstrong radeex at gmail.com
Thu Sep 9 20:53:58 CEST 2004


I'm contributing to the Soya3d[1] project, which is written primarily
in Pyrex. Currently it's using "include" for everything, but I want to
switch it to use cimport.

1: http://home.gna.org/oomadness/en/soya/index.html

The necessity of splitting the cdefs out of .pyx files into .pxd files
is annoying me. It seems the only reason for this would be to
facilitate compiling module A which cimports module B without module
B's implementation, right? Well, in this project, this isn't
necessary, and I would expect that it's pretty rarely necessary
elsewhere... So why isn't it possible for Pyrex to just check the
implementation if the .pxd isn't available on a cimport? Just that
nobody thought of it / implemented it, or is there some other design
decision?

Thanks!

-- 
 Twisted | Christopher Armstrong: International Man of Twistery
  Radix  |          Release Manager,  Twisted Project
---------+            http://radix.twistedmatrix.com




More information about the Pyrex mailing list