Hi, Lisandro Dalcin wrote: > On 6/1/08, Stefan Behnel <[EMAIL PROTECTED]> wrote: >> Hi, >> Can't you work with singleton proxies? That's what we do in lxml. There's >> never more than one Python Element proxy for an XML node struct. > > I'll take a look, but I believe such approach, even if possible, would > complicate a lot my implementation.
Not sure. A factory function for creating proxies is a good idea in general, and once that's in place, you can do all sorts of weird things in there. > Stefan, iff it is no much work for you, could you point me a link to > the actual lxml code implementing all this machinery? Ah, asking about the deep magic, right? ;) Here's the _elementFactory() function: http://codespeak.net/svn/lxml/trunk/src/lxml/lxml.etree.pyx and a bit more of the proxy machinery is in here: http://codespeak.net/svn/lxml/trunk/src/lxml/proxy.pxi But that truly is black magic... Stefan _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
