[issue9401] automatically try forward operations when reverse operations are NotImplemented
report at bugs.python.org
Mon Sep 20 21:55:07 CEST 2010
Michael Gilbert <michael.s.gilbert at gmail.com> added the comment:
i think that, for example, the default __rsub__ implementation could be:
return self + -other
which should just do the right thing assuming the addition and negation functions already do the right thing for the class type.
anyway, any implementation should leave the option to override the default __r*__ methods, which would keep the implementation backwards compatible as well.
can i keep this open as a feature request?
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list