Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

Macro, we appreciate your sentiments.  Please consider this module has been 
around for a long time and that others aren't reacting to the API the same way 
you are.  Deprecating SubElement, fromstringlist() and tostringlist() because 
you don't like them will just cause disruption to existing, deployed code.  
You're about 15 years too late for a design discussion ;-)  That ship has 
sailed. 

Your proposal to add a new feature for comparing elements is in the realm of 
the possible.  That said, the other respondents made a reasonable case the 
different people would want to do it differently.  Despite your insistence that 
only your way makes sense, we do have to consider other users as well.  The 
other respondents provided you with other ways to meet your needs. Their 
disinclination to not add this feature is backed-up by years of experience with 
this module and with lxml.

Communication note: Please do not go down of the path of making yourself the 
arbiter of what is Pythonic or standard.  The other core devs in this 
conversation are highly experienced.  Insulting them or the Fredrik Lundh's 
existing API won't help matters.

We should add a clear note to the docs:  "Comparing the string serialized XML 
should not be used to establish semantic equality.  The preferred ways are to 
use C14N canonicalization or to write a tree walker where the notion of 
equivalence can be customized to include/exclude attribute order, to 
include/exclude comments or processing instructions, to include/exclude 
whitespace at non-leaf nodes".

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37792>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to