Skip to content

returning NotImplemented from __radd__ does not work as expected #1479

@slozier

Description

@slozier

For example:

called = [False]

class test(int):
    def __radd__(self, other):
        called[0] = True
        return NotImplemented

assert 1 + test() == 1 # throws with ipy
assert called[0]

Similar to #560. See also #1478.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions