Message349348
FWIW, deep traversing an XML tree on an operation as simple as "==" seems excessive. To me, object identity comparison seems the most sensible behaviour of "==" on Element objects.
(It's not "complicated to implement", but rather can be very expensive to execute.)
Regarding your other questions (and note that this is a bug tracker, so discussing unrelated questions in a ticket is inappropriate – use the Python mailing list instead if you want):
"SubElement" suggests a constructor, yes. It kind-of makes sense, given what it does, and resembles "Element", which is the constructor for a (non-sub) Element. It might seem funny, sure, but on the other hand, why should users be bothered with the implementation detail that it is a function? :-)
"fromstringlist()" matches "tostringlist()", API-wise. Both are probably not very widely used, but I don't see much value in removing them. It always breaks someone's code out there. |
|
Date |
User |
Action |
Args |
2019-08-10 18:31:26 | scoder | set | recipients:
+ scoder, rhettinger, eli.bendersky, Marco Sulla |
2019-08-10 18:31:26 | scoder | set | messageid: <1565461886.5.0.332935749936.issue37792@roundup.psfhosted.org> |
2019-08-10 18:31:26 | scoder | link | issue37792 messages |
2019-08-10 18:31:26 | scoder | create | |
|