[lxml-dev] Weakref support?

Stefan Behnel stefan_ml at behnel.de
Mon Jul 20 09:21:50 CEST 2009


Christian Zagrodnick wrote:
> On 2009-07-19 15:25:52 +0200, Stefan Behnel said:
>> Is there a specific use case you have in mind?
> 
> Actually all I'd need is a reference to the tree. I don't think 
> weak-refs to all elements are necessary or useful. Well, maybe they 
> are, but I don't need them :)

That sounds better. :)

Feel free to add a

	cdef object __weakref__

to the _ElementTree class (below the _context_node attribute) and see if
that works for you. Please report back if it turns out be useful.

Stefan


More information about the lxml-dev mailing list