mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Removed the API to create unbound methods and simplified the API for bound methods. The signature is PyMethod_New(func, instance).
Also removed im_class and renamed im_self to __self__ and im_func to __func__. im_class can be substituted with method.__self__.__class__. I've also updated some parts of the documenation.
This commit is contained in:
parent
0d3fb8a944
commit
ff737954f3
23 changed files with 152 additions and 268 deletions
|
@ -67,7 +67,7 @@ class PyclbrTest(TestCase):
|
|||
if isinstance(obj, MethodType):
|
||||
# could be a classmethod
|
||||
if (not isinstance(classdict[name], ClassMethodType) or
|
||||
obj.im_self is not oclass):
|
||||
obj.__self__ is not oclass):
|
||||
return False
|
||||
elif not isinstance(obj, FunctionType):
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue