mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
Remove apply()
This commit is contained in:
parent
fe55464f39
commit
d91085598f
56 changed files with 179 additions and 285 deletions
|
@ -14,7 +14,7 @@ class MetaMethodWrapper:
|
|||
self.__name__ = self.func.__name__
|
||||
|
||||
def __call__(self, *args, **kw):
|
||||
return apply(self.func, (self.inst,) + args, kw)
|
||||
return self.func(self.inst, *args, **kw)
|
||||
|
||||
class MetaHelper:
|
||||
|
||||
|
@ -86,7 +86,7 @@ class MetaClass:
|
|||
init = inst.__getattr__('__init__')
|
||||
except AttributeError:
|
||||
init = lambda: None
|
||||
apply(init, args, kw)
|
||||
init(*args, **kw)
|
||||
return inst
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue