[issue9401] automatically try forward operations when reverse operations are NotImplemented

2010-09-23 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: No, but you could bring it up on python-ideas. (It would have to wait until after the moratorium in any case.) -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

[issue9401] automatically try forward operations when reverse operations are NotImplemented

2010-09-20 Thread Michael Gilbert
Michael Gilbert michael.s.gilb...@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.

[issue9401] automatically try forward operations when reverse operations are NotImplemented

2010-07-29 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: This might work for (normally) commutative operations like multiplication and addition, but what about those like subtraction? If the interpreter uses the non-reversed method automatically, it has to apply semantics, but the semantics depend

[issue9401] automatically try forward operations when reverse operations are NotImplemented

2010-07-28 Thread Michael Gilbert
New submission from Michael Gilbert michael.s.gilb...@gmail.com: in order to make overrides simpler, and more obvious to average developers, it would be very useful to automatically call the forward operations (e.g. __mul__) when the reverse operations (e.g. __rmul__) are NotImplemented. i