Skip to content
Snippets Groups Projects
Commit eb84a830 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

py/runtime: Implement dispatch for "reverse op" special methods.

If, for class X, X.__add__(Y) doesn't exist (or returns NotImplemented),
try Y.__radd__(X) instead.

This patch could be simpler, but requires undoing operand swap and
operation switch to get non-confusing error message in case __radd__
doesn't exist.
parent de981040
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment