-
Notifications
You must be signed in to change notification settings - Fork 0
weakref
jasper-zanjani edited this page Aug 6, 2020
·
1 revision
Support weak references, that is, references to objects which return exceptions when that object has been garbage collected Create a weak reference to {object}
# A weak reference created using `ref` must be dereferenced
r = weakref.ref(obj)
r().method()
r.method() # will not work
# A weak reference created using `proxy` does not need to be dereferenced:
weakref.proxy(obj)- argparse ?
- array ?
- asyncio ?
- bisect ?
- csv ?
- ctypes ?
- curses ?
- datetime ?
- functools ?
- getpass ?
- glob ?
- heapq ?
- http ?
- json ?
- logging ?
- optparse ?
- os ?
- pathlib ?
- platform ?
- pythonnet ?
- random ?
- socket ?
- subprocess ?
- sqlite3 ?
- sys ?
- termcolor ?
- threading ?
- trace ?
- typing ?
- unittest ?
- urllib ?
- venv ?
- weakref ?
- winrm ?