...

摘要: ```python import typing from typing import Union from functools import wraps def merge_args(varnames: tuple, args: tuple, kwargs: dict) -> dict: merge 阅读全文
posted @ 2023-06-19 16:09 韩志超 阅读(61) 评论(0) 推荐(0) 编辑
摘要: 在Python中一切皆对象,函数也是一种对象,有相关的属性和方法。 对于任意对象,我们可以用dir()函数来获取其内置的属性及方法名,例如: ```python def add(a: int, b: int=1) -> int: """加法函数""" return a + b print(dir(a 阅读全文
posted @ 2023-06-19 13:18 韩志超 阅读(59) 评论(0) 推荐(0) 编辑