dictionnary properties
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4984647/accessing-dict-keys-like-an-attribute-in-python">Accessing dict keys like an attribute in Python?</a>  </p>
</blockquote>



<p>Is there a way to implement this in python</p>

<pre><code>foo = {'test_1': 1,'test_2': 2}
print foo.test_1
&gt;&gt;&gt; 1
</code></pre>

<p>Maybe if I extend dict, but I do not know how to dynamically generate functions.</p>
