title: Bracket assignment in Python
body: <p>I would like to create a class that is able to do the following</p>
  <pre><code>class Test:
      # code here
  
  test = Test()
  test[&quot;test&quot;] = 1
  test.test  # returns 1
  </code></pre>
  <p>Is this possible in Python using magic methods (e.g. not inheriting from <code>dict</code>)?</p>