``ProxyType`` or ``CallableProxyType``, depending on whether *object* is
callable. Proxy objects are not :term:`hashable` regardless of the referent; this
avoids a number of problems related to their fundamentally mutable nature, and
- prevent their use as dictionary keys. *callback* is the same as the parameter
+ prevents their use as dictionary keys. *callback* is the same as the parameter
of the same name to the :func:`ref` function.
Accessing an attribute of the proxy object after the referent is
discarded when no strong reference to it exists any more.
-.. class:: WeakMethod(method)
+.. class:: WeakMethod(method[, callback])
A custom :class:`ref` subclass which simulates a weak reference to a bound
method (i.e., a method defined on a class and looked up on an instance).
>>> r()
>>>
+ *callback* is the same as the parameter of the same name to the :func:`ref` function.
+
.. versionadded:: 3.4
.. class:: finalize(obj, func, /, *args, **kwargs)