摘要:
源码解读 BaseSerializer(field) def __init__(self, instance=None, data=empty, **kwargs): self.instance = instance if data is not empty: self.initial_data = 阅读全文
摘要:
fill 将多行文本按照指定的宽度和格式输出 s = "Look into my eyes, look into my eyes, the eyes, the eyes, \ the eyes, not around the eyes, don't look around the eyes, \ l 阅读全文
摘要:
defaultdict 创建一个多值字典,如果我们自己实现 # 我们自己实现 d = {} for key, value in pairs: if key not in d: d[key] = [] d[key].append(value) # 使用defaultdict d = defaultdi 阅读全文