This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ShashkovS
Recipients ShashkovS
Date 2019-01-11.10:31:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1547202706.27.0.805945162412.issue25412@roundup.psfhosted.org>
In-reply-to
Content
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()))
History
Date User Action Args
2019-01-11 10:31:48ShashkovSsetrecipients: + ShashkovS
2019-01-11 10:31:46ShashkovSsetmessageid: <1547202706.27.0.805945162412.issue25412@roundup.psfhosted.org>
2019-01-11 10:31:46ShashkovSlinkissue25412 messages
2019-01-11 10:31:46ShashkovScreate