[issue33274] minidom removeAttributeNode returns None

Ari Krupnik report at bugs.python.org
Thu Jun 7 10:38:32 EDT 2018


Ari Krupnik <ari at lib.aero> added the comment:

I feel a little bit like I wandered into a card game whose rules I didn't understand. I'm just a lay, mortal user. I've been writing Python for 15 years, first time I saw an opportunity to contribute back. I saw what looked to me like a bug that's been in the code for 18 years, and I saw that it was a simple fix. You want a News entry? I'm happy to write a news entry. You want a full stop at the end? I'm happy to make that commit. You want me to write something in the doc? I'm happy to do that. What you do with my contribution is your call. I don't make the rules, like I said, I don't even understand them so well.


When I first found this bug, I saw it as a very low-risk fix in terms of API change. It seems less likely that someone somewhere has code that depends on this function that always returning None. Python makes a very hard distinction between statements and expressions, and like you're saying, the Pythonic assumption is that a mutator is a statement whose return value one doesn't check. If this function returned a value, but the value were different from the spec, it would be a higher-risk change.


As a side note, I'm a 2.7 user, so would benefit from backporting this fix.


All this said, you're the maintainer, I'm the user, you don't have to justify your decisions to me. If you decide against backporting, I encourage you to update the documentation in earlier versions to state explicitly that this one mutator in the module diverges from the standard which the module otherwise implements faithfully.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33274>
_______________________________________


More information about the Python-bugs-list mailing list