在 Python 中,实例方法(instance method),类方法(class method)与静态方法(static method)经常容易混淆。 实例方法 Python 的实例方法用得最多,也最常见。我们先来看 Python 的实例方法。 class Kls(object): def __init__(self, data): self.data = data def printd(self): print(self.data) ik1 = Kls('leo') ik2 = Kls('lee') ik1.printd() i...