]> granicus.if.org Git - python/commitdiff
Fix-up half-written paragraph in the docs
authorRaymond Hettinger <python@rcn.com>
Tue, 15 Jan 2008 21:22:47 +0000 (21:22 +0000)
committerRaymond Hettinger <python@rcn.com>
Tue, 15 Jan 2008 21:22:47 +0000 (21:22 +0000)
Doc/library/collections.rst

index de9bcbfae2da433b5bfaa93f862af7b935f27f7f..cde114cd246e213d4edc69a4430f7bde671a68aa 100644 (file)
@@ -535,13 +535,9 @@ faster versions that bypass error-checking::
         def _replace(self, _map=map, **kwds):
             return self._make(_map(kwds.get, ('x', 'y'), self))
 
-Note, subclasses should set ``__slots__`` to an empty tuple so that
-an instance dictionary will not be created and the memory overhead
-will be kept to zero.
-
-Note, subclasses should set ``__slots__`` to an empty tuple.  This
-reduces memory usage by 
-
+The subclasses shown above set ``__slots__`` to an empty tuple.  This keeps
+the named tuples from having per-instance dictionaries, so they will
+continue to be lightweight and require no more memory than regular tuples.
 
 Subclassing is not useful for adding new, stored fields.  Instead, simply
 create a new named tuple type from the :attr:`_fields` attribute::