[Python-Dev] Fixing the XML batteries

"Martin v. Löwis" martin at v.loewis.de
Sun Dec 11 23:03:41 CET 2011


Am 09.12.2011 10:09, schrieb Xavier Morel:
> On 2011-12-09, at 09:41 , Martin v. Löwis wrote:
>>> a) The stdlib documentation should help users to choose the right
>>> tool right from the start. Instead of using the totally
>>> misleading wording that it uses now, it should be honest about
>>> the performance characteristics of MiniDOM and should actively
>>> suggest that those who don't know what to choose (or even *that*
>>> they can choose) should not use MiniDOM in the first place.
>> 
[...]
> 
> Minidom is inferior in interface flow and pythonicity, in terseness,
> in speed, in memory consumption (even more so using cElementTree, and
> that's not something which can be fixed unless minidom gets a C
> accelerator), etc… Even after fixing minidom (if anybody has the time
> and drive to commit to it), ET/cET should be preferred over it.

I don't mind pointing people to ElementTree, despite that I disagree
whether the ET interface is "superior" to DOM. It's Stefan's reasoning
as to *why* people should be pointed to ET, and what words should be
used to do that. IOW, I detest bashing some part of the standard
library, just to urge users to use some other part of the standard library.

People are still using PyXML, despite it's not being maintained anymore.
Telling them to replace 4DOM with minidom is much more appropriate than
telling them to rewrite in ET.

Regards,
Martin


More information about the Python-Dev mailing list