On Saturday 21 July 2007, James Y Knight wrote: > Well...there's many reasons why it is useful to be able to parse an > already-decoded unicode stream into XML, and to serialize XML into a > unicode string. For example, if combining into a larger unicode > document, or parsing from a literal string in the source code.
Yes, but that doesn't mean it's the XML parser's job to take multiple input types. It could easily be supported by creating a wrapper object that converts unicode to bytes objects, so the underlying C parser still gets bytes. Such a wrapper could easily be part of xml.parsers.expat if desired, but I'd like to avoid adding lots of stuff to the pyexpat C code. Avoiding complexifying the C code is a good thing. ;-) -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
