[lxml-dev] 2.0 ElementTree 1.3 compat: getiterator

jholg at gmx.de jholg at gmx.de
Wed Oct 24 15:32:45 CEST 2007


> The idea was that getiterator() returned a list in older ET versions,
> while
> the docs said something like "returns an iterable: either an iterator or a
> list". lxml always returned an iterator here.
> 
> Since we now have iter() in place, Fredrik suggested that reverting
> getiterator() to the original behaviour would be the cleanest solution. I
> actually agree with that, but I am still waiting for Fredrik to actually
> make
> that change official.
> 
> 
> > I for one think it counter-intuitive for getiterator() to return a list,
> so
> > I think lxml got that right in the first place.
> 
> I would agree from the point of view of the method name, but disagree for
> reasons of API redundancy and backwards compatibility.

Thanks for the clarification.
I see, but from an lxml point of view we are actually losing backwards compatibility, aren't we ;-)

Holger


-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser


More information about the lxml-dev mailing list