mirror of
https://github.com/python/cpython.git
synced 2025-08-01 23:53:15 +00:00
Document other performance implication for __slots__ (GH-11974)
This commit is contained in:
parent
3ad9167305
commit
7463884f69
1 changed files with 1 additions and 0 deletions
|
@ -1727,6 +1727,7 @@ properties) and deny the creation of *__dict__* and *__weakref__*
|
||||||
(unless explicitly declared in *__slots__* or available in a parent.)
|
(unless explicitly declared in *__slots__* or available in a parent.)
|
||||||
|
|
||||||
The space saved over using *__dict__* can be significant.
|
The space saved over using *__dict__* can be significant.
|
||||||
|
Attribute lookup speed can be significantly improved as well.
|
||||||
|
|
||||||
.. data:: object.__slots__
|
.. data:: object.__slots__
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue