From: Georg Brandl Date: Wed, 21 Oct 2009 07:15:59 +0000 (+0000) Subject: #7170: fix explanation about non-weakrefable builtin types. X-Git-Tag: v2.7a1~294 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf842ad418fa2b4b820e9f15a69dc5dd04dbd546;p=python #7170: fix explanation about non-weakrefable builtin types. --- 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`.