class s_all(metaclass=abc.ABCMeta): #python2.7 use this method to define interface inheritance # __metaclass__ = abc.ABCMeta @abc.abstractmethod def read(self): pass
pyhton2.7 will report an error, this method is used for python3+
pyhton2.7 application method definition
class s_all(): #python2.7 use this method to define interface inheritance __metaclass__ = abc.ABCMeta @abc.abstractmethod def read(self): pass