title: Python __call__() is this an implicit classmethod?
body: <p>I want to implement a singleton pattern in python, and I liked the pattern described in the <a href="http://www.python-course.eu/python3_metaclasses.php" rel="noreferrer">http://www.python-course.eu/python3_metaclasses.php</a>.</p>
  
  <pre><code>class Singleton(type):
      _instances = {}
      def __call__(cls, *args, **kwargs):
          if cls not in cls._instances:
              cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
          return cls._instances[cls]
  
  
  class SingletonClass(metaclass=Singleton):
      pass
  class RegularClass():
      pass
  x = SingletonClass()
  y = SingletonClass()
  print(x == y)
  x = RegularClass()
  y = RegularClass()
  print(x == y) 
  </code></pre>
  
  <p>And the code works perfect. But, the <code>__call__()</code> does not have the <code>self</code>, and it also does not have <code>@classmethod</code> or <code>@staticmethod</code> declaration.</p>
  
  <p>But, in the Python data model <a href="https://docs.python.org/3/reference/datamodel.html#object.__call__" rel="noreferrer">https://docs.python.org/3/reference/datamodel.html#object.__call__</a> the <code>__call__()</code> method has a self in the arguments.</p>
  
  <p>The code does not work if I pass <code>self</code>, or declare as <code>@staticmethod</code> or <code>@classmethod</code>. </p>
  
  <p>Can someone please explain the logic of the syntax behind the <code>__call__()</code> method.</p>