You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: It's a little strange that instancemethod as a type sticks around even though literally nothing in Python uses it. Is there some reason we kept it in the 3.x transition? Extension types are using it, so I guess we can't drop it now, but I'm trying to figure out why it was kept around, allowing the extensions to develop dependencies on it.
Activity
wolever commentedon Nov 30, 2016
The PyInstanceMethod_Type, unlike all other method types, isn't hashable.
It seems like the code exists, it's just been commented out: https://github.com/python/cpython/blame/c30098c8c6014f3340a369a31df9c74bdbacc269/Objects/classobject.c#L569
This came up here: wolever/pprintpp#18
And Christian Heimes doesn't remember why it was commented out: https://twitter.com/ChristianHeimes/status/803900655324790784
MojoVampire commentedon Nov 30, 2016
Note: It's a little strange that instancemethod as a type sticks around even though literally nothing in Python uses it. Is there some reason we kept it in the 3.x transition? Extension types are using it, so I guess we can't drop it now, but I'm trying to figure out why it was kept around, allowing the extensions to develop dependencies on it.
hugovk commentedon Feb 28, 2024
The commented
instancemethod_hashwas removed in #31814.