title: Alternate way of using __init_subclass__ in python 2.7
body: <p>1-<code>BaseClass.py</code>---&gt;</p>
  <pre><code>class BaseClass:
  
      request_mapper = {}
      def __init_subclass__(cls, data_validation_case_name=None, **kwargs):
          #super().__init_subclass__(**kwargs)
          if data_validation_case_name is None:
              data_validation_case_name = cls.__name__
              print(&quot;data_validation_case_name=[{}]&quot;.format(data_validation_case_name))
          print(&quot;Type of cls is =[{}]&quot;.format(type(cls)))
          cls.request_mapper[data_validation_case_name] = cls
  
      @classmethod
      def get_class_for_data_validation_case_name(cls, data_validation_case_name):
          if data_validation_case_name in cls.request_mapper:
              return cls.request_mapper[data_validation_case_name]
          else:
              raise NotImplementedError
  </code></pre>
  <p>2-<code>ChildClass.py</code>----&gt;</p>
  <pre><code>from BaseClass import BaseClass
  
  class count_check(BaseClass):
      @classmethod
      def execute(cls,self):
          print('count_check_execute')
          return
  
  class duplicate_check(BaseClass):
      def execute(self):
          print('duplicate_check_execute')
          return
  </code></pre>
  <p>3-<code>call_main.py</code>---&gt;</p>
  <pre><code>import BaseClass
  from ChildClass import *
  
  list_of_cases=['count_check','duplicate_check']
  
  if __name__ == &quot;__main__&quot;:
  
     for validation_case_name in list_of_cases:
        child_validation_class = BaseClass.get_class_for_data_validation_case_name(validation_case_name)
        child_validation_class.execute(child_validation_class)
  </code></pre>
  <p>4- <code>__init__.py</code>---&gt;</p>
  <p>I have four files as a package and I am running the call_main.py. When I run this with python 3.7 it gives me an output but not with python 2.7 since <code>__init_subclass__()</code> is not being supported in python 2.</p>
  <p>Is there an alternate way we can do similar thing in python 2</p>