Message333448
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())) |
|
Date |
User |
Action |
Args |
2019-01-11 10:31:48 | ShashkovS | set | recipients:
+ ShashkovS |
2019-01-11 10:31:46 | ShashkovS | set | messageid: <1547202706.27.0.805945162412.issue25412@roundup.psfhosted.org> |
2019-01-11 10:31:46 | ShashkovS | link | issue25412 messages |
2019-01-11 10:31:46 | ShashkovS | create | |
|