This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Marco Sulla
Recipients Marco Sulla, eli.bendersky, rhettinger, scoder, serhiy.storchaka
Date 2019-08-21.21:51:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1566424305.08.0.165891243743.issue37792@roundup.psfhosted.org>
In-reply-to
Content
@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.
History
Date User Action Args
2019-08-21 21:51:45Marco Sullasetrecipients: + Marco Sulla, rhettinger, scoder, eli.bendersky, serhiy.storchaka
2019-08-21 21:51:45Marco Sullasetmessageid: <1566424305.08.0.165891243743.issue37792@roundup.psfhosted.org>
2019-08-21 21:51:45Marco Sullalinkissue37792 messages
2019-08-21 21:51:44Marco Sullacreate