title: Initialising dictionary like class
body: <pre><code>class fileInfo(dict):
      def __init__(self, name, typ, size = 1):
          self = {}
          self["name"] = name
          self["type"] = typ
          self["size"] = size
  
      def __getitem__(self, key):
          if key == "name":
              return dict.__getitem__(self, "name")+ "." + dict.__getitem__(self, "type")
          return dict.__getitem__(self, key)
  </code></pre>
  
  <p>I have created this class, but I have problems with the <strong>init</strong> function.
  When I try to initialize an object of this class, the <strong>init</strong> function returns me an empty dictionary.</p>
  
  <p>What am I not understanding as far as the initialization function is concerned?</p>