实现接口类的两种方式 方式一 from abc import ABCMeta from abc import abstractmethod class BaseMessage(metaclass=ABCMeta): @abstractmethod def send(self,subject,body,to,name): pass 方式二 class BaseMessage(object): def send(self, subject, body, to, name): raise NotImp…