[lxml-dev] Proposal: Better html5lib Support
Stefan Behnel
stefan_ml at behnel.de
Tue Jul 15 07:39:08 CEST 2008
Hi,
Armin Ronacher wrote:
>> Yes. Although this isn't really a bug (you should use the Comment factory to
>> create a comment, not the _Comment or HtmlComment classes), this seems to be a
>> common misconception especially by new users. This behaviour will change in
>> lxml 2.2, where calling an Element class already creates a new Element.
> There is no Comment factory in lxml.html, just in lxml.etree which i use right
> now. But that one creates a different object.
> [...] it returns a lxml.etree._Comment and not an lxml.html.HtmlComment or I'm
> missing something.
Ah, right. Interesting that no-one ever notices these things. :)
Anyway, this will be fixed in 2.2, as soon as I get to implementing it.
Stefan
More information about the lxml-dev
mailing list