title: abstractmethod decorator to all methods in class
body: <p>I tried to make my realization where i don't need to use all times to all methods decorator <code>@abstractmethod</code></p>
  <p>Firstly, i realize class decorator, but this don't need any result:</p>
  <pre><code>from abc import ABC, abstractmethod
  
  
  def interface(cls):
     for attr in cls.__dict__:
        if callable(getattr(cls, attr)):
           setattr(cls, attr, abstractmethod(getattr(cls, attr)))
      
     return cls
  
  
  @interface
  class A(ABC):
     def foo(self):
        pass
  
     def bar(self):
        pass
  
  
  class B(A):
     def foo(self):
        pass
  
  b = B()
  </code></pre>
  <p>Secondly, i tried make it in <code>__init__</code> method in class and it's don't give any result too:</p>
  <pre><code>class Interface(ABC):
      def __init__(self):
          for attr in self.__dict__:
              attr_obj = getattr(self, attr)
  
              if callable(attr_obj):
                  setattr(self, attr, abstractmethod(attr_obj))
  
  class A(Interface):
     def __init__(self):
        super().__init__()
  
     def foo(self):
        pass
  
     def bar(self):
        pass
  
  
  class B(A):
     def foo(self):
        pass
  
  
  b = B()
  </code></pre>
  <p>How can i realize a way where all methods in class decorated with <code>@abstractmethod</code>?</p>