Sergey Shashkov <s...@yandex.ru> added the comment:
This patch actually fixes the problem: https://bugs.python.org/issue35588 https://github.com/python/cpython/commit/3a374e0c5abe805667b71ffaaa7614781101ff4c from fractions import Fraction import operator class Goo: __radd__, __rdivmod__, __rfloordiv__, __rmod__, __rmul__, __rpow__, __rsub__, __rtruediv__ = [lambda a, b: 'ok'] * 8 for func in operator.add, operator.sub, operator.mul, operator.truediv, operator.pow, operator.mod, operator.floordiv, divmod: print(func.__name__, func(Fraction(1), Goo())) ---------- nosy: -mark.dickinson, oscarbenjamin, vstinner pull_requests: +11085 resolution: -> fixed stage: -> patch review status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue25412> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com