On this page
article
weakref — Weak References
References that don’t prevent GC.
Overview
References that don’t prevent GC.
Quick Example
weakref.WeakValueDictionary()
When to Use
Use this module when you need built-in support without adding third-party dependencies.
Common Tasks
- Read the official docs: docs.python.org/3/library/weakref.html
- Combine with related modules in the Cookbook
- Prefer stdlib before reaching for PyPI packages