Skip to content

FIx method resolution in number slots when a single method is a subclass#6228

Draft
MatthieuDartiailh wants to merge 3 commits into
PyO3:mainfrom
MatthieuDartiailh:binary-op-fix
Draft

FIx method resolution in number slots when a single method is a subclass#6228
MatthieuDartiailh wants to merge 3 commits into
PyO3:mainfrom
MatthieuDartiailh:binary-op-fix

Conversation

@MatthieuDartiailh

Copy link
Copy Markdown
Contributor

Closes #6024

When a class implement both half of a slot (__add__ and __radd__) we use the old dispatch strategy except that we dispatch to the appropriate according to the type of the arguments. In other cases, we use a super object to support multiple inheritance with pure Python classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reversible arithmetic operators don't respect subclassing if only one arm implemented

1 participant