-
functools
The functools module is for higher-order functions: functions that act on or return other functions.
-
包含功能
-
装饰器
- @functools.cached_property(func)
- @functools.lru_cache(user_function)
- @functools.lru_cache(maxsize=128, typed=False)
- @functools.total_ordering
- @functools.singledispatch
- @functools.wraps(wrapped, assigned=WRAPPER_ASSIGNMENTS, updated= WRAPPER_UPDATES)
-
函数
- functools.cmp_to_key(func)
- functools.parial(func,/,*args,**keywords)
- functools.reduce(function, iterable[, initializer])
- functools.update_wrapper(warpper, wrapped, assigned=WARPPER_ASSIGNMENTS,updated=WRAPPER_UPDATES)
-
类
class functools.parialmethod(func,/,*args,**keywords)
- class functools.singledispathchmethod(func)
-
初识functools模块
最新推荐文章于 2021-10-19 18:45:48 发布