elementtree question
Fredrik Lundh
fredrik at pythonware.com
Wed Sep 26 04:20:07 EDT 2007
Stefan Behnel wrote:
> ET 1.3 will also support the extend() function, BTW.
div.extend(seq) can be trivially rewritten as
div[len(div):] = seq
and in this case, you know that len(div) is 0, so you can simply do:
div[:] = seq
(this recent lxml habit of using lxml-specific versions of things that
are trivial to do with the standard API is a bit disappointing. kind of
defeats the purpose of having a standard API...)
</F>
More information about the Python-list
mailing list