Python how to Implement Interfaces

preview_player
Показать описание
Python how to Implement Interfaces
import abc
class MyInterface(abc.ABC):
def fun1(self):
pass

class MyClass(MyInterface):
def fun1(self):
print("Hello")
Рекомендации по теме
Комментарии
Автор

Inheriting ABC class makes a class as abstract class, then do you mean interfaces and abstract classes are the same ? I am confused about this.

chihothebhingsdcdfccyuu
Автор

Please use an IDE, it will be much more clear.

GIT_Somya