bpo-20092: Make __int__ defaults to __index__#13106
bpo-20092: Make __int__ defaults to __index__#13106remilapeyre wants to merge 5 commits intopython:masterfrom
Conversation
jdemeyer
left a comment
There was a problem hiding this comment.
Instead of handling this on the level of the Python __dict__, wouldn't it be better to handle this in nb_int? That is, set nb_int to nb_index. That way, it's also guaranteed to work for extension types defining only nb_index.
|
@jdemeyer, I was not absolutly clear with how the methods that have a slot interact with I will push a commit to update the slots instead of |
It's complicated, I would have to look up the details myself. But basically, the slots are used to put entries in the |
|
Thanks @jdemeyer, I think the last change should be good to make |
|
What I meant is that should only do and then the wrapper descriptor |
|
This doesn't seem to work, with this: I get: |
|
Please post your failing branch, otherwise it's hard to guess what the problem is. |
|
@jdemeyer, thanks, I pushed my last commit |
|
#13108 has been merged so the issue is now resolved. |
https://bugs.python.org/issue33039