Marco Sulla <launchpad....@marco.sulla.e4ward.com> added the comment:
@scoder: 1. the fact that == does not traverse the Element is IMHO unpythonic and non-standard. A trivial example: >>> a = {1: {2: 3}} >>> b = {1: {2: 3}} >>> a == b True You can have a dictionary complicated as you want, but if they have the same structure, the two dictionaries will be always equals, even if their id are not. I think that no one could say to remove this dictionary feature and simply check the ids, leaving the deep comparison to the user, without raising a rebellion :) 2. the fact that SubElement seems a constructor is not an implementation detail. It's misleading and confusing, since a programmer expects that it will return an object of type SubElement, while there's no SubElement class. This is peculiar. I can be wrong, but I never encountered such a bizarre naming in the standard library. IMHO SubElement should be deprecated and it should call `subElement()`, a simply copy of the old SubElement 3. I'm not suggesting to remove fromstringlist and tostringlist, but that they could be deprecated and simply call fromstring and tostring, that should use duck typing for doing what fromstringlist and tostringlist did. ---------- _______________________________________ 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