[Python-checkins] r65136 - python/trunk/Doc/reference/datamodel.rst

georg.brandl python-checkins at python.org
Sat Jul 19 15:09:44 CEST 2008


Author: georg.brandl
Date: Sat Jul 19 15:09:42 2008
New Revision: 65136

Log:
#3323: mention that if inheriting from a class without __slots__,
the subclass will have a __dict__ available too.


Modified:
   python/trunk/Doc/reference/datamodel.rst

Modified: python/trunk/Doc/reference/datamodel.rst
==============================================================================
--- python/trunk/Doc/reference/datamodel.rst	(original)
+++ python/trunk/Doc/reference/datamodel.rst	Sat Jul 19 15:09:42 2008
@@ -1600,6 +1600,10 @@
 
 Notes on using *__slots__*
 
+* When inheriting from a class without *__slots__*, the *__dict__* attribute of
+  that class will always be accessible, so a *__slots__* definition in the
+  subclass is meaningless.
+
 * Without a *__dict__* variable, instances cannot be assigned new variables not
   listed in the *__slots__* definition.  Attempts to assign to an unlisted
   variable name raises :exc:`AttributeError`. If dynamic assignment of new


More information about the Python-checkins mailing list