Author ncoghlan
Recipients eli.bendersky, flox, jcea, jkloth, ncoghlan, python-dev, scoder
Date 2013-08-26.07:49:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1377503369.85.0.652017924157.issue17741@psf.upfronthosting.co.za>
In-reply-to
Content
Eli's summary left out an exchange between us that happened after he'd already written the summary - he pointed out the same problem with the EventParser name that you noticed: it's really an alternative XMLParser that exposes read_events(), rather than an event parser. So a completely different name like "EventScanner" or "EventStream" may be more appropriate. (I quite like EventStream, since it further suggests the destructive nature of read_events()).

As for why we think it's worth keeping this as a separate API, it's really about turning XMLParser's "push" API for events (where the events are pushed into the target object by the parser calling the appropriate methods), into an iterparse style pull API where the events can be retrieved via calls to read_events().

The back end implementation for the event streaming API *should* be a custom target object combined with a regular XMLParser object, but there are implementation issues currently preventing that.

We also discussed adding the event streaming interface directly to XMLParser, but I agreed with Eli that it's worth keeping that base API simple, especially since in the long run we want the new class to just be a convenience API for combining XMLParser and a custom target object, even if it can't be implemented that way right now.
History
Date User Action Args
2013-08-26 07:49:29ncoghlansetrecipients: + ncoghlan, jcea, scoder, jkloth, eli.bendersky, flox, python-dev
2013-08-26 07:49:29ncoghlansetmessageid: <1377503369.85.0.652017924157.issue17741@psf.upfronthosting.co.za>
2013-08-26 07:49:29ncoghlanlinkissue17741 messages
2013-08-26 07:49:29ncoghlancreate