消息 [153230]
> 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!
Because of the interaction of the support.import_fresh_module with the CleanContext context manager, it's not so easy to remove black magic.
I don't find better than:
if hasattr(ET, '_namespace_map'):
_namespace_map = ET._namespace_map
else:
from xml.etree.ElementTree import _namespace_map
This is why I kept the import in the deprecated "cElementTree" at first.
It does not hurt (it's private API), and it makes the test easier.
( If you have doubts, try ./python -m test test_xml_etree{,_c} or variants. )
I will probably commit code and documentation at once. It makes things easier regarding traceability. |
|
| 日期 |
用户 |
动作 |
参数 |
| 2012-02-12 21:07:45 | flox | 修改 | recipients:
+ flox, effbot, scoder, ezio.melotti, eric.araujo, Arfrever, eli.bendersky, tshepang, python-dev |
| 2012-02-12 21:07:45 | flox | 修改 | messageid: <1329080865.73.0.500579895781.issue13988@psf.upfronthosting.co.za> |
| 2012-02-12 21:07:45 | flox | 链接 | issue13988 messages |
| 2012-02-12 21:07:45 | flox | 创建 | |
|