在记录实例变量时,我可以
class Foo:
def __init__(self):
self.spam = 4
"""Docstring for instance attribute spam."""
这不适用于并行分配
class Foo:
def __init__(self):
self.spam, self.bar, self.moo = 4, 5, 6
"""Docstring for instance attribute spam."""
如何在并行赋值中记录变量?