On this page
atexit.unregister
Prev: atexit.register | Up: atexit
Rel: atexit.register
Ref: docs.python.org — atexit.unregister
Tags: #public #python3 #stdlib #atexit
Import
import atexit
from atexit import unregister
Signature & Overview
atexit.unregister(func, /)
Unregister an exit function which was previously registered using atexit.register func - function to be unregistered
Usage
import atexit
cb = lambda: None
atexit.register(cb)
atexit.unregister(cb) # safe no-op if already unregistered
Gotchas
- Removes ALL matching registrations of
func(by equality==) without raising if not found.
REPL Inspect
from atexit import unregister
help(unregister)
Linked from
Related notes
- tuts/python3/stdlib_module/atexit/register Linked here; links to this page; shared tags: #atexit, #stdlib
- tuts/python3/stdlib_module/atexit Linked here; links to this page; shared tags: #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib
- tuts/c/stdlib/assert/assert shared tags: #stdlib
- tuts/c/stdlib/assert/static_assert shared tags: #stdlib
- tuts/c/stdlib/ctype shared tags: #stdlib
- tuts/c/stdlib/ctype/isalpha shared tags: #stdlib
- tuts/c/stdlib/ctype/isdigit shared tags: #stdlib
- tuts/c/stdlib/ctype/isspace shared tags: #stdlib