[Python-checkins] Document other performance implication for __slots__ (GH-11974)

Miss Islington (bot) webhook-mailer at python.org
Thu Feb 21 06:34:17 EST 2019


https://github.com/python/cpython/commit/7463884f6993edcd92bec56213ee1959034fd31c
commit: 7463884f6993edcd92bec56213ee1959034fd31c
branch: master
author: Raymond Hettinger <rhettinger at users.noreply.github.com>
committer: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
date: 2019-02-21T03:34:04-08:00
summary:

Document other performance implication for __slots__ (GH-11974)

files:
M Doc/reference/datamodel.rst

diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 9961aee14e06..9422ae66cb9c 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1727,6 +1727,7 @@ properties) and deny the creation of *__dict__* and *__weakref__*
 (unless explicitly declared in *__slots__* or available in a parent.)
 
 The space saved over using *__dict__* can be significant.
+Attribute lookup speed can be significantly improved as well.
 
 .. data:: object.__slots__
 



More information about the Python-checkins mailing list