继承: 提高代码的重用性,减少了代码的冗余 这两个写法是一样的 Wa('青蛙').walk() #青蛙 can walk wa = Wa('青蛙') wa.walk() #青蛙 can walk 1.单继承麻烦的写法(为什么要有单继承) 如果多个类相似的情况下(每个都写一遍有大量重复 浪费麻烦) class Tiger(object): def __init__(self,name): self.name = name def walk(self): print('%s can walk'%se…
2016年12月26日 星期一 --出埃及记 Exodus 21:21 but he is not to be punished if the slave gets up after a day or two, since the slave is his property.若过一两天才死,就可以不受刑,因为是用钱买的.…
2016年11月26日 星期六 --出埃及记 Exodus 20:17 "You shall not covet your neighbor's house. You shall not covet your neighbor's wife, or his manservant or maidservant, his ox or donkey, or anything that belongs to your neighbor." 不可贪恋人的房屋,也不可贪恋人的妻子,仆婢,牛驴,并他…