[Pyrex] [PATCH] 'include' statements inside 'cdef class' level

Stefan Behnel stefan_ml at behnel.de
Sat Sep 8 08:38:54 CEST 2007


Greg Ewing wrote:
> When I introduced cimport, I regarded include as being
> mostly obsoleted by it, so I didn't have much motivation
> for extending include's functionality.

lxml.etree actually uses "include" for its modularisation. The
interdependencies between the different parts are currenty too high for other
mechanisms (both in terms of defined classes and functions). There's also the
advantage of handing the whole module to the C compiler at once, which allows
it to inline globally used helper functions and the like.

For the separate modules of lxml we use the public C-API, which gives us a
more coarse grained, loosely coupled level of interaction.

Stefan



More information about the Pyrex mailing list