summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-10-21 07:15:59 +0000
committerGeorg Brandl <georg@python.org>2009-10-21 07:15:59 +0000
commitcf842ad418fa2b4b820e9f15a69dc5dd04dbd546 (patch)
tree4bed86677c2e41b3856b3df5654fd2840bca38a4
parent9bd246bba9410abca2d7ba9387d0b93bb6c9ae2c (diff)
downloadcpython-git-cf842ad418fa2b4b820e9f15a69dc5dd04dbd546.tar.gz
#7170: fix explanation about non-weakrefable builtin types.
-rw-r--r--Doc/library/weakref.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/library/weakref.rst b/Doc/library/weakref.rst
index a1a3314ffb..c800ecd31e 100644
--- a/Doc/library/weakref.rst
+++ b/Doc/library/weakref.rst
@@ -76,6 +76,10 @@ support weak references but can add support through subclassing::
obj = Dict(red=1, green=2, blue=3) # this object is weak referenceable
+Other built-in types such as :class:`tuple` and :class:`long` do not support
+weak references even when subclassed (those types implemented as a
+:ctype:`PyVarObject`).
+
Extension types can easily be made to support weak references; see
:ref:`weakref-support`.