title: TypeError: object.__new__() takes exactly one argument (the type to instantiate)
body: <p>I would like to implement class with name MyClass. 
  This class should be a singleton and it has to inherit from BaseClass. </p>
  
  <p>In the end I came up with following solution:</p>
  
  <pre><code>import random
  
  
  class Singleton(object):
      _instances = {}
  
      def __new__(cls, *args, **kwargs):
          if cls not in cls._instances:
              cls._instances[cls] = super(Singleton, cls).__new__(cls, *args, **kwargs)
          return cls._instances[cls]
  
  
  class BaseClass(object):
      def __init__(self, data):
          self.value = random.random()
          self.data = data
  
      def asfaa(self):
          pass
  
  
  class MyClass(BaseClass, Singleton):
      def __init__(self, data=3):
          super().__init__(data)
          self.a = random.random()
  
  
  inst = MyClass(3)
  </code></pre>
  
  <p>Evrythig is working properly if <code>def __init__(self, data=3)</code> of MyClass doesn`t have any arguments.<br>
  Otherwise I am getting error </p>
  
  <pre><code>line 9, in __new__
  cls._instances[cls] = super(Singleton, cls).__new__(cls, *args, **kwargs)
  TypeError: object.__new__() takes exactly one argument (the type to instantiate)
  </code></pre>
  
  <p>How to suppply any arguments to MyClass?</p>