[lxml-dev] Renaming the drop_*() methods
Stefan Behnel
stefan_ml at behnel.de
Wed Jun 13 22:23:57 CEST 2007
Stefan Behnel wrote:
> Ian Bicking wrote:
>> Incidentally, someone asked for a drop_tree method in another context,
>> and maybe it makes sense in more than just HTML. It's a tricky method
>> to get right, in that you can do it lazily and get it wrong (e.g.,
>> assume the element doesn't have a tail, or assume it does and it's not
>> None, or that the element really has a previous sibling, or doesn't).
>
> Right. But what about helper *functions* then instead? They could work on any
> element, not just on those that define them as methods.
Ah, I knew I wasn't the first one who had that idea... :)
http://effbot.org/zone/element-lib.htm
http://effbot.org/zone/element-bits-and-pieces.htm
I think we should try to get back in touch with FL to see if we can't get
something compatible out of this. Haven't heard of him in a while, though.
Stefan
More information about the lxml-dev
mailing list