weakref.CallableProxyType
Up: weakref | Next: weakref.finalize
Rel: weakref.finalize, weakref.getweakrefcount, weakref.getweakrefs, weakref.proxy
Ref: docs.python.org — weakref.CallableProxyType
Tags: #public #python3 #stdlib #weakref
Import
import weakref
from weakref import CallableProxyType
Signature & Overview
weakref.CallableProxyType()
weakref.CallableProxyType class.
Usage
import weakref
class Fn:
def __call__(self): return 42
f = Fn()
p = weakref.proxy(f)
assert isinstance(p, weakref.CallableProxyType) and p() == 42
Gotchas
- Returned by
weakref.proxy()for callable targets.
REPL Inspect
from weakref import CallableProxyType
help(CallableProxyType)
Linked from
- tuts/python3/stdlib_module/weakref
- tuts/python3/stdlib_module/weakref/finalize
- tuts/python3/stdlib_module/weakref/getweakrefcount
- tuts/python3/stdlib_module/weakref/getweakrefs
- tuts/python3/stdlib_module/weakref/proxy
- tuts/python3/stdlib_module/weakref/ProxyType
- tuts/python3/stdlib_module/weakref/ref
- tuts/python3/stdlib_module/weakref/ReferenceType
- tuts/python3/stdlib_module/weakref/WeakKeyDictionary
- tuts/python3/stdlib_module/weakref/WeakMethod
- tuts/python3/stdlib_module/weakref/WeakSet
- tuts/python3/stdlib_module/weakref/WeakValueDictionary
Related notes
- tuts/python3/stdlib_module/weakref/finalize Linked here; links to this page; shared tags: #stdlib, #weakref
- tuts/python3/stdlib_module/weakref/getweakrefcount Linked here; links to this page; shared tags: #stdlib, #weakref
- tuts/python3/stdlib_module/weakref/getweakrefs Linked here; links to this page; shared tags: #stdlib, #weakref
- tuts/python3/stdlib_module/weakref/proxy Linked here; links to this page; shared tags: #stdlib, #weakref
- tuts/python3/stdlib_module/weakref Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/weakref/ProxyType links to this page; shared tags: #stdlib, #weakref
- tuts/python3/stdlib_module/weakref/ref links to this page; shared tags: #stdlib, #weakref
- tuts/python3/stdlib_module/weakref/ReferenceType links to this page; shared tags: #stdlib, #weakref
- tuts/python3/stdlib_module/weakref/WeakKeyDictionary links to this page; shared tags: #stdlib, #weakref
- tuts/python3/stdlib_module/weakref/WeakMethod links to this page; shared tags: #stdlib, #weakref