摘要: def tuplify_dicts(dicts: list): # 字典列表 转为 具名元组列表 keys = {key for line in dicts for key in line.keys()} Struct = namedtuple('Struct', sorted(keys), ren 阅读全文
posted @ 2024-01-24 13:28 sangern 阅读(13) 评论(0) 推荐(0) 编辑
摘要: def func(a, b=9, c=33): print(a, b, c) func(98) # 98 9 33 func.__defaults__ # (9, 33) func.__defaults__ = 125, 620 func.__defaults__ # (125, 620) 修改了 阅读全文
posted @ 2024-01-24 13:27 sangern 阅读(5) 评论(0) 推荐(0) 编辑