[issue25958] Implicit ABCs have no means of "anti-registration"

Andrew Barnert report at bugs.python.org
Tue Jan 5 17:06:44 EST 2016


Andrew Barnert added the comment:

The second patch takes into account all the issues raised by Martin and Guido, as well as some other changes that didn't make it into the first patch because Windows hates me. And it should be flattened into a single commit, and therefore should hopefully work with Rietveld out of the box. It passes the test suite on Windows and Cygwin (and on OS X, but that's a slightly older version of the changes than what's in this flattened patch).

I think it's still an open question whether Reversible should inherit Iterable. In the current patch, as in the first, it does.

I'll go over Serhiy's Reitveld comments to see if there's anything I missed, and, if so, address it in a third attempt.

On Serhiy's test suggestions:

 * I don't think we need to repeat the same tests on every ABC. That seems more likely to introduce copy-paste bugs than to catch anything, especially since the ABCs now all share the same code, but the tests couldn't.

 * Likewise for adding repetitive tests on more __spam__, __ispam__, and __rspam__ methods.

 * However, he's definitely right that there are other kinds of fallback worth testing, like __ne__ -> __eq__. I'll review the different kinds of fallback more carefully and make sure we have tests for each case.

----------
Added file: http://bugs.python.org/file41509/patch2.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25958>
_______________________________________


More information about the Python-bugs-list mailing list