已采纳回答 / qq_hush_ceklpC
class Animal(): passdog = Animal()cat = Animal()print(dog)print(cat)print(dog == cat)
2021-07-09
最赞回答 / 奶香馒头
我明白了,super(Teacher,self).__init__(name,gender)这是python2.x中的语法,class括号里要带object,python3.x语法里class可以不带
2021-05-28
最赞回答 / weixin_慕哥4444959
isinstance(t,Person)print(isinstance(t,Person))isinstance(t,Student)print(isinstance(t,Student))isinstance(t,Teacher)print(isinstance(t,Teacher))TrueFalseTrue
2021-05-19
最新回答 / 慕九州4260586
class P(object): def __init__(self,name): self.name = nameclass Skill(object): def __init__(self,skill): self.skill = skill class F(Skill): def __init__(self,skill): super(F,self).__init__(skill) #self.skill = 'footba...
2021-05-18