title: How does inheritance of __slots__ in subclasses actually work?
body: <p>In the <a href="http://docs.python.org/reference/datamodel.html#slots" rel="noreferrer">Python data model reference section on slots</a> there is a list of notes on using <code>__slots__</code>.  I am thoroughly confused by the 1st and 6th items, because they seem to be contradicting each other. </p>
  
  <p><strong>First item:</strong></p>
  
  <ul>
  <li>When inheriting from a class without
  <code>__slots__</code>, the <code>__dict__</code> attribute
  of that class will always be
  accessible, so a <code>__slots__</code>
  definition in the subclass is
  meaningless.</li>
  </ul>
  
  <p><strong>Sixth item:</strong></p>
  
  <ul>
  <li>The action of a <code>__slots__</code>
  declaration is limited to the class
  where it is defined. As a result,
  subclasses will have a <code>__dict__</code>
  unless they also define <code>__slots__</code>
  (which must only contain names of any
  additional slots).</li>
  </ul>
  
  <p>It seems to me these items could be better worded or shown through code, but I have been trying to wrap my head around this and am still coming up confused. I do understand how <code>__slots__</code> are <a href="https://stackoverflow.com/questions/472000/python-slots/472024#472024">supposed to be used</a>, and I am trying to get a better grasp on how they work.</p>
  
  <p><strong>The Question:</strong></p>
  
  <p>Can someone please explain to me in plain language what the conditions are for inheritance of slots when subclassing? </p>
  
  <p>(Simple code examples would be helpful but not necessary.)</p>