[lxml-dev] merge annotate() and xsiannotate() into single function

Stefan Behnel stefan_ml at behnel.de
Tue Jun 26 18:20:54 CEST 2007



jholg at gmx.de wrote:
>>> -I'd like to keep TREE attribute info for *leaf* tree elements if
>>> ignore_old is False, so that a full annotate->serialize->re-parse cycle
>> has
>>> a chance of keeping these elements ObjectifiedElements.
>> Then how would you get rid of those if you wanted to?
> 
> By using ignore_old=True. I admit this is kind of an abuse of ignore_old, so it would be cleaner to add yet another switch to handle this.

Really sounds like an abuse to me.


> Looking at the _annotate interface I'd say it is quite complex to grasp what will happen for different parameter combinations, as they can have
> certain side effects on each other. I think it's a good thing to have the
> simpler annotate() and xsiannotate() entry points.

That would make it pyannotate(), xsiannotate() and annotate() then ?

Although, we already have annotate() for pyannotate(), but the above three
names would be The Right Ones...

Stefan


More information about the lxml-dev mailing list