📅  最后修改于: 2022-03-11 14:45:39.492000             🧑  作者: Mango
class A:
def __init__(self, a):
self.a = a
def p(self, b=self.a): #Wrong way
print b
def p(self, b=None): #Correct way
if b is None:
b = self.a
print b