title: What is the difference between SimpleNamespace and empty class definition?
body: <p>The following seems to work either way. What is the advantage (other than the nice <code>repr</code>) of using <code>types.SimpleNamespace</code>? Or is it the same thing?</p>
  
  <pre><code>&gt;&gt;&gt; import types
  &gt;&gt;&gt; class Cls():
  ...     pass
  ... 
  &gt;&gt;&gt; foo = types.SimpleNamespace() # or foo = Cls()
  &gt;&gt;&gt; foo.bar = 42
  &gt;&gt;&gt; foo.bar
  42
  &gt;&gt;&gt; del foo.bar
  &gt;&gt;&gt; foo.bar
  AttributeError: 'types.SimpleNamespace' object has no attribute 'bar'
  </code></pre>