What are the Difference between cElementtree and ElementTree?

后端 未结 5 1784
感动是毒
感动是毒 2021-01-01 14:00

I know a little of dom, and would like to learn about ElementTree. Python 2.6 has a somewhat older implementation of ElementTree, but still usable. However, it looks like it

5条回答
  •  滥情空心
    2021-01-01 14:18

    From http://effbot.org/zone/celementtree.htm:

    The cElementTree module is a C implementation of the ElementTree API, optimized for fast parsing and low memory use. On typical documents, cElementTree is 15-20 times faster than the Python version of ElementTree, and uses 2-5 times less memory

提交回复
热议问题