lxml/ElementTree and .tail

Chas Emerick cemerick at snowtide.com
Sun Nov 19 03:56:10 CET 2006


On Nov 18, 2006, at 1:12 PM, Fredrik Lundh wrote:

> Chas Emerick wrote:
>
>> Further, the fact that ET/lxml works the way that it does makes me
>> think that there may be some other landmines in the underlying model
>> that we might not have discovered until some days, weeks, etc., had
>> passed
>
> so the real reason you posted your original post was to spread some  
> FUD,
> not to get help?  that's a bit disappointing.

<sarcasm>
Yeah, that's exactly it.  In fact, if you look back at the head of  
this thread, you'll see how I was looking to disparage ET.  I  
especially wanted to make sure ET's API doesn't get any traction in  
the python community.  It's especially important that ET not find  
popular success and acclaim -- I'd have quite a bit to gain from it  
remaining a niche library.
</sarcasm>

Fredrik, I wasn't attempting to spread anything.  I was confused, I  
posed some illustrative examples, and asked for people's thoughts.   
Your reply gave me the right vocabulary to find more information  
(i.e. about Infoset), and I replied with a overview of what I had  
learned so as to benefit anyone with similar questions or confusion  
in the future.  A discussion ensued.

ET (and lxml) is obviously extremely successful, widely used, and for  
good reason.  It's just not right for us, but you incorrectly  
surmised that I was simply lazy by not modifying/extending ET/lxml to  
make it suitable for our purposes even when other libraries existed  
that better meshed with our requirements.  I tried to answer as  
straightforwardly as possible, and (regrettably, it turns out)  
included the fact that I had worried that our apparent conceptual  
differences indicated that we might find other instances where ET/ 
lxml works differently than we would expect.  I think that's very  
rational, and doesn't speak poorly of ET in any way (especially given  
its obvious success elsewhere).

- Chas



More information about the Python-list mailing list