Message349348
| Author |
scoder |
| Recipients |
Marco Sulla, eli.bendersky, rhettinger, scoder |
| Date |
2019年08月10日.18:31:26 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1565461886.5.0.332935749936.issue37792@roundup.psfhosted.org> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|