[Python-Dev] XML codec?

"Martin v. Löwis" martin at v.loewis.de
Fri Nov 9 22:26:02 CET 2007


> It makes working with XML data a lot easier: you simply don't have to
> bother with the encoding of the XML data anymore and can just let the
> codec figure out the details. The XML parser can then work directly
> on the Unicode data.

Having the functionality indeed makes things easier. However, I don't
find

  s.decode(xml.detect_encoding(s))

particularly more difficult than

  s.decode("xml-auto-detection")

> Whether it needs to be in C or not is another question (I would have
> done this in Python since performance is not really an issue), but since
> the code is already written, why not use it ?

It's a maintenance issue.

Regards,
Martin



More information about the Python-Dev mailing list