[lxml-dev] Weakref support?
Christian Zagrodnick
cz at gocept.com
Mon Jul 27 11:12:09 CEST 2009
On 20.07.2009, at 09:21, Stefan Behnel wrote:
>
> 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. :)
Okay, just for the fun of it I added weakref to element.
With : Ran 1025 tests in 15.731s
Without: Ran 1025 tests in 15.584s
In the latter case the weakref test fails of course. Patch attached.
I don't know what the memory implications are, though?
--
Christian Zagrodnick · cz at gocept.com
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: weakref.patch
Type: application/octet-stream
Size: 1270 bytes
Desc: not available
Url : http://codespeak.net/pipermail/lxml-dev/attachments/20090727/b247e43c/attachment-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2474 bytes
Desc: not available
Url : http://codespeak.net/pipermail/lxml-dev/attachments/20090727/b247e43c/attachment-0001.bin
More information about the lxml-dev
mailing list