title: Print an object's attributes like json.dumps prints a dict
body: <p><strong>EDIT</strong>: a solution is in this answer: <a href="https://stackoverflow.com/a/23689767/1422096">How to use a dot “.” to access members of dictionary?</a></p>
  
  <p>When using a dict:</p>
  
  <pre><code>d = dict()
  d['param1'] = 17
  d['param2'] = 3
  </code></pre>
  
  <p>it's easy to print it with  <code>print json.dumps(d)</code>. When using an object / class:</p>
  
  <pre><code>class z: 
      pass
  z.param1 = 17
  z.param2 = 3
  </code></pre>
  
  <p><strong>I can't manage to print all the attributes of z, neither with <code>print json.dumps(z)</code>, nor with <code>print z</code>. How to do it?</strong></p>
  
  <hr>
  
  <p><em>Sidenote but important: why do I want to use a class / object to store parameters, when it would be logical to use a dict? Because <code>z.param1</code> is much shorter and handy to write than <code>z['param1']</code>, especially with my (french) keyword <code>[</code>, <code>]</code>, <code>'</code>are quit long to write because ALT+GR+5 (let's say 2 seconds instead of 0.5, but this really matters when you have a long code with many variables)</em></p>