摘要:
lru_cache import functools, time @functools.lru_cache(maxsize=128, typed=False) def b(x, y, z=3): time.sleep(2) return x + y print(b(5, 6)) print('~' 阅读全文
摘要:
import inspect def b(x, y: int = 5, *args, z, t=55, **kwargs) -> int: return x + y signature = inspect.signature(b) print(signature) print(signature.p 阅读全文