if not checked_reverse and hasattr(w, op):
    res = getattr(w, _mirrored_op[op])(v)
if res is not NotImplemented:
    return res
if op == '__eq__':
    res = v is w
elif op == '__ne__':
    res = v is not w
else:
    raise TypeError('sth')
return res
Возврат NotImplemented из __eq__