[Python-ideas] ElementTree iterparse string

Ryan rymg19 at gmail.com
Wed Aug 7 16:41:16 CEST 2013


I was referring to the other suggestion, IncrementalParser.

Masklinn <masklinn at masklinn.net> wrote:

>On 2013-08-07, at 16:12 , Ryan wrote:
>
>> Actually, is was a feature suggestion, not a question.
>> 
>> And, I have the 3.3 version of the docs, so I didn't realize they
>already added that new feature.
>
>If you're talking about using StringIO, it's not a new feature, it was
>already there before elementtree was even merged to the stdlib.
>Although
>it could be clearer, the 2.7 doc for iterparse already notes
>
>> source is a filename or file object containing XML data.
>
>as in other methods & utility functions (parse, ElementTree.parse and
>ElementTree.write) "file object" should really be understood as
>"file-like object". And more precisely, for parsing it's an object with
>a `read(size_hint: int)` method.
>_______________________________________________
>Python-ideas mailing list
>Python-ideas at python.org
>http://mail.python.org/mailman/listinfo/python-ideas

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130807/4e3b32c9/attachment.html>


More information about the Python-ideas mailing list