0%
简介
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
from abc import ABC, abstractmethod
class People(ABC):
@abstractmethod def walk(self): pass @abstractmethod def eat(self,a): print(' i am your father ,eat %s.' %a) def dance(self): print('我在跳舞')
class Kingname(People): def __init__(self): pass def walk(self): print('i am a boy') def eat(self): super().eat('apple')
kingname = Kingname() kingname.eat()
|