import functools
classapi_export(object):def__init__(self,*arg,**kwags):
self._api_name = kwags.get('api_name','hahaha')
self._a = arg[0]
self._b = arg[1]defadd(self):return self._a + self._b
defshow(self):if self._api_name =='hahaha':print("the origin is None")if self._api_name =='hehehe':print("hehehehehehe")if self._api_name =='pashan':print("Would you like to climb the mountain with me?~")
one = functools.partial(api_export,3)
two = functools.partial(api_export,api_name ='hahaha')
three = functools.partial(api_export,3,api_name ='pashan')