title: Python __dict__
body: <p>The attribute <code>__dict__</code> is supposed to contain user defined attributes. But if we print the <code>__dict__</code> of an empty class, I would also get: </p>
  
  <pre><code>__module__
  __dict__ 
  __weakref__
  __doc__
  </code></pre>
  
  <p>Which are prepopulated by Python in the <code>__dict__</code> attribute accordingly to the class object type.</p>
  
  <p>Now, <code>__base__</code> and <code>__class__</code> are also Python defined attributes of a class object type, but not included in <code>__dict__</code>.</p>
  
  <p>Is there any rule that specifies which dunder attribute is included in an object <code>__dict__</code> and which are not?</p>