<p>引用<a href="http://code.activestate.com/lists/python-list/531365/" rel="noreferrer">Jacob Hallen</a>:</p>
<blockquote>
<p>The proper use of <code>__slots__</code> is to save space in objects. Instead of having
a dynamic dict that allows adding attributes to objects at anytime,
there is a static structure which does not allow additions after creation.
[This use of <code>__slots__</code> eliminates the overhead of one dict for every object.] While this is sometimes a useful optimization, it would be completely
unnecessary if the Python interpreter was dynamic enough so that it would
only require the dict when there actually were additions to the object.</p>
<p>Unfortunately there is a side effect to slots. They change the behavior of
the objects that have slots in a way that can be abused by control freaks
and static typing weenies. This is bad, because the control freaks should
be abusing the metaclasses and the static typing weenies should be abusing
decorators, since in Python, there should be only one obvious way of doing something.</p>
<p>Making CPython smart enough to handle saving space without <code>__slots__</code> is a major
undertaking, which is probably why it is not on the list of changes for P3k (yet).</p>
</blockquote>