only nonempty __slots__ don't work

This commit is contained in:
Benjamin Peterson 2008-10-23 21:43:48 +00:00
parent 611e48c1bb
commit c756dcdd60

View file

@ -1663,8 +1663,8 @@ Notes on using *__slots__*
defined. As a result, subclasses will have a *__dict__* unless they also define defined. As a result, subclasses will have a *__dict__* unless they also define
*__slots__*. *__slots__*.
* *__slots__* do not work for classes derived from "variable-length" built-in * Nonempty *__slots__* does not work for classes derived from "variable-length"
types such as :class:`long`, :class:`str` and :class:`tuple`. built-in types such as :class:`long`, :class:`str` and :class:`tuple`.
* Any non-string iterable may be assigned to *__slots__*. Mappings may also be * Any non-string iterable may be assigned to *__slots__*. Mappings may also be
used; however, in the future, special meaning may be assigned to the values used; however, in the future, special meaning may be assigned to the values