Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] folding cElementTree behind ElementTree in 3.3

Eli Benderskyeliben at gmail.com
Wed Feb 8 07:07:42 CET 2012


On Wed, Feb 8, 2012 at 07:10, Fred Drake <fdrake at acm.org> wrote:> On Tue, Feb 7, 2012 at 11:46 PM, Eli Bendersky <eliben at gmail.com> wrote:>> The initial proposal of changing *the stdlib>> import facade* for xml.etree.ElementTree to use the C accelerator>> (_elementtree) by default.>> I guess this is one source of confusion: what are you referring to an> an "import façade"?  When I look in Lib/xml/etree/, I see the ElementTree,> ElementPath, and ElementInclude modules, and a wrapper for cElementTree's> extension module.>> There isn't any sort of façade for ElementTree; are you proposing to add> one, perhaps in xml.etree/__init__.py?AFAICS ElementPath is a helper used by ElementTree, and cElementTreehas one of its own. It's not documented for stand-alone use.ElementInclude also isn't documented and doesn't appear to be usedanywhere.The facade can be added to xml/etree/ElementTree.py since that's theonly documented module. It can attempt to do:from _elementtree import *(which is what cElementTree.py) does, and on failure, just go on doingwhat it does now.Eli


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp