diff options
Diffstat (limited to 'Doc/library/collections.rst')
-rw-r--r-- | Doc/library/collections.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index f1a8fff..cbc9c6b 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -566,6 +566,9 @@ faster versions that bypass error-checking:: def _replace(self, _map=map, **kwds): return self._make(_map(kwds.get, ('x', 'y'), self)) +The subclasses shown above set ``__slots__`` to an empty tuple. This keeps +keep memory requirements low by preventing the creation of instance dictionaries. + Subclassing is not useful for adding new, stored fields. Instead, simply create a new named tuple type from the :attr:`_fields` attribute:: |