From: Benjamin Peterson Date: Thu, 23 Oct 2008 21:43:48 +0000 (+0000) Subject: only nonempty __slots__ don't work X-Git-Tag: v2.7a1~2706 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c756dcdd6086a5619e5acc0899197b01ae149e37;p=thirdparty%2FPython%2Fcpython.git only nonempty __slots__ don't work --- diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 8e3e79ec607d..b1ab8fd97cc6 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -1663,8 +1663,8 @@ Notes on using *__slots__* defined. As a result, subclasses will have a *__dict__* unless they also define *__slots__*. -* *__slots__* do not work for classes derived from "variable-length" built-in - types such as :class:`long`, :class:`str` and :class:`tuple`. +* Nonempty *__slots__* does not work for classes derived from "variable-length" + 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 used; however, in the future, special meaning may be assigned to the values