[Python-Dev] ElementTree in stdlib (original) (raw)

Ian Bicking ianb at colorstudy.com
Wed Dec 14 18:39:33 CET 2005


M.-A. Lemburg wrote:

we also need to figure out how to import the bundled version; should it be cElementTree, xml.etree.cElementTree, or just xml.etree.ElementTree (which would then fallback on the Python version if cElementTree isn't built) ?

If the semantics are identical I'd prefer the latter approach of using the faster variant if possible.

I have myself in the past used or overridden non-public methods of ElementTree, which I'm sure wouldn't work with cElementTree. While I'd also prefer automatic fallback, it would be nice if there was additionally an explicit path to each version.

-- Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org



More information about the Python-Dev mailing list