See this discussion.
Normal NotImplemented situation : A() + B() is resolved in A.__add__(A(), B()) which if returning NotImplemented, falls back to B.__radd__(B(), A()).
Now this behavior means there can be a double fallback : in a += b, if A.__iadd__ exists but returns NotImplemented, it will first fall back to A.__add__ and then to B.__radd__.
This is a great feature, but it's not currently documented.
Linked PRs
See this discussion.
Normal NotImplemented situation :
A() + B()is resolved inA.__add__(A(), B())which if returning NotImplemented, falls back toB.__radd__(B(), A()).Now this behavior means there can be a double fallback : in
a += b, ifA.__iadd__exists but returns NotImplemented, it will first fall back toA.__add__and then toB.__radd__.This is a great feature, but it's not currently documented.
Linked PRs