title: dictionary as a class argument in python
body: <p>I am just starting Python for solving one project and I am struggling a lot with the syntax and usage as I have coded in type checking language only (Java, C++).
  Here I am defining one class and inside that class, I want to store one dictionary of objects but I am not able to access that dictionary in other function of that class. below example give me the same error:</p>
  
  <p>Code:   </p>
  
  <pre><code> class abc:
       def __init__(self):
       a =10
  
    class test:
      def __init__(self):
        self.ddict['xyz'] = abc()
  
      def access(self):
        self.ddict['def'] = abc()
  </code></pre>
  
  <p>I am getting the error:<br>
  <strong>self.ddict['xyz'] = abc()
  AttributeError: test instance has no attribute 'ddict'</strong></p>