Le Mon, 26 Aug 2013 08:24:58 -0400, Tres Seaver <tsea...@palladion.com> a écrit : > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 08/26/2013 04:36 AM, Antoine Pitrou wrote: > > event-driven processing using network librarie > > Maybe I missed something: why should considerations from that topic > influence the design of an API for XML processing?
Because this API is mostly useful when the data is received (*) at a slow enough speed - which usually means from the network, not from a hard drive. ((*) "data" ... "received"; does it ring a bell? ;-)) If you want iterative processing from a fast data source, you can already use iterparse(): it's blocking, but it's not a problem with disk I/O (not to mention that non-blocking disk I/O doesn't really exist under Linux, AFAIK: I haven't been able to get EAGAIN with os.read() on a non-blocking file, even when reading from a huge uncached file). The whole *point* of adding IncrementalParser was to parse incoming XML data in a way that is friendly with event-driven network programming, other use cases being *already* covered by existing APIs. This is why it's far from nonsensical to re-use an existing terminology from that world. If you don't do any non-blocking network I/O, then fine - you won't even need the API, and can safely ignore its existence. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com