[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree

Eli Bendersky report at bugs.python.org
Sun Feb 12 20:11:15 CET 2012


Eli Bendersky <eliben at gmail.com> added the comment:

By the way, I see that if the explicit import of _namespace_map is commented out, the test_xml_etree_c test fails because it's not in the __all__ list. So the test can just import it directly with:

from xml.etree.ElementTree import _namespace_map

And the import in cElementTree won't be necessary. After all, _namespace_map is definitely not a public API!

This will keep cElementTree an nice-and-clean:

from xml.etree.ElementTree import *

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13988>
_______________________________________


More information about the Python-bugs-list mailing list