[Python-Dev] please back out changeset f903cf864191 before alpha-2 (original) (raw)
Stefan Behnel stefan_ml at behnel.de
Tue Aug 27 10:10:51 CEST 2013
- Previous message: [Python-Dev] please back out changeset f903cf864191 before alpha-2
- Next message: [Python-Dev] please back out changeset f903cf864191 before alpha-2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Simon Cross, 27.08.2013 09:58:
On Mon, Aug 26, 2013 at 5:57 PM, Antoine Pitrou wrote:
What do you mean, "all events have to be ready"? If you look at the unit tests, the events are generated on-the-fly, not at the end of the document. (exactly the same as iterparse(), except that iterparse() is blocking) So you have to poll .events()? That also seems unhelpful from an event driven programming perspective. What I'm driving at is that I'd expect to have access to some sort of deferred that fires when the next event is ready to be processed and I don't see that here.
The idea is that you pass data into the parser and then ask read_events() for an event iterator. If/When that's empty, you're done.
No repeated polling or anything, just all in one shot whenever data is available.
It's a really nice interface by design, just badly integrated into the existing API.
Stefan
- Previous message: [Python-Dev] please back out changeset f903cf864191 before alpha-2
- Next message: [Python-Dev] please back out changeset f903cf864191 before alpha-2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]