title: Convert objects hierarchy from MATLAB to to python
body: <p>I am converting a MATLAB script into python. The MATLAB script uses some kind of objects hierarchy for different input variables as in:</p>
  
  <pre><code>parameterA.subparameter1= A1;
  parameterA.subparameter2= A2;
  
  parameterB.subparameter1= B1;
  parameterB.subparameter2= B2;
  </code></pre>
  
  <p>Where <code>A1,A2,B1,B2</code> can all be strings and numbers. I wish to convert this to python and I have used </p>
  
  <pre><code>parameterA.subparameter1= A1
  parameterA.subparameter2= A2
  
  parameterB.subparameter1= B1
  parameterB.subparameter2= B2
  </code></pre>
  
  <p>Now I am getting the error:</p>
  
  <blockquote>
    <p>NameError: name 'parameterA' is not defined</p>
  </blockquote>
  
  <p>I have tried to initialize them by using either <code>parameterA,parameterB=[],[]</code>, which is not good because I want objects and not a list or <code>parameterA,parameterB=set(),set()</code> according to <a href="https://stackoverflow.com/questions/19476816/creating-an-empty-object-in-python">this post</a> as well as some other solution. </p>
  
  <p>Is this at all the correct approach? How do I initialize this structure? Is there a better way to do this?</p>