js constructor 继承
function Animal(){
this.die = function() {}
}
dog = new Animal()
cat = new Animal()
dog.die === cat.die // false (实例间的属性没有共享)
js prototype 继承
function Animal(){
}
Animal.prototype.die = function() {}
dog = new Animal()
cat = new Animal()
dog.die === cat.die // ture (实例间的属性是共享的)
那么问题来了? python 的继承 ,实例间的属性和方法是共享的吗
class Animal():
def die(self):
pass
dog = Animal()
cat = Animal()
dog.die is cat.die ???