On 12/13/05, Walter Dörwald <[EMAIL PROTECTED]> wrote:
> Guido van Rossum wrote:
> > I don't think that SAX is unpythonic, but it's pretty low-level and
> > mostly of use to people writing higher-level XML parsers (my parsexml
> > module uses it).
>
> Having to define classes that conform to a certain API and registering
> instances of those classes as callbacks with the parser doesn't look
> that pythonic to me. An iterator API seems much more pythonic.

Perhaps. Although the SAX API lets you leave a callback undefined if
you don't have a need to handle those events; that's a bit trickier to
do with an iterator. Also the different callbacks have different
signatures.

But since /F solved this for ElementTree I have to mostly agree with you. :-)

> Then again, pythonic is whatever you say that it is. ;)

Not at all. I will argue but I will also take arguments from others. Seriously.

--
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
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

Reply via email to