On this page
importlib.reload
Prev: importlib.invalidate_caches | Up: importlib
Rel: importlib.import_module, importlib.invalidate_caches
Ref: docs.python.org — importlib.reload
Tags: #public #python3 #stdlib #importlib
Import
import importlib
from importlib import reload
Signature & Overview
importlib.reload(module)
Reload the module and return it.
Usage
import importlib
import colorsys
reloaded = importlib.reload(colorsys)
assert reloaded is colorsys
Gotchas
- Does NOT update existing
from mod import fnbindings: References imported into other modules still point to the old objects.
REPL Inspect
from importlib import reload
help(reload)
Linked from
Related notes
- tuts/python3/stdlib_module/importlib/import_module Linked here; links to this page; shared tags: #importlib, #stdlib
- tuts/python3/stdlib_module/importlib/invalidate_caches Linked here; links to this page; shared tags: #importlib, #stdlib
- tuts/python3/stdlib_module/importlib 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