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:
Christian Heimes 2007-11-27 10:40:20 +00:00
parent 0d3fb8a944
commit ff737954f3
23 changed files with 152 additions and 268 deletions

View file

@ -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