On this page
types.resolve_bases
Prev: types.prepare_class | Up: types
Rel: types.AsyncGeneratorType, types.BuiltinFunctionType, types.BuiltinMethodType, types.CapsuleType
Ref: docs.python.org — types.resolve_bases
Tags: #public #python3 #stdlib #types
Import
import types
from types import resolve_bases
Signature & Overview
types.resolve_bases(bases)
Resolve MRO entries dynamically as specified by PEP 560.
Usage
import types
resolved = types.resolve_bases((list[int],))
assert resolved == (list,)
Gotchas
- Expands
__mro_entries__on generic aliases before constructing a dynamic class.
REPL Inspect
from types import resolve_bases
help(resolve_bases)
Linked from
Related notes
- tuts/python3/stdlib_module/types/prepare_class Linked here; links to this page; shared tags: #stdlib, #types
- tuts/python3/stdlib_module/types Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/types/AsyncGeneratorType Linked here; shared tags: #stdlib, #types
- tuts/python3/stdlib_module/types/BuiltinFunctionType Linked here; shared tags: #stdlib, #types
- tuts/python3/stdlib_module/types/BuiltinMethodType Linked here; shared tags: #stdlib, #types
- tuts/python3/stdlib_module/types/CapsuleType Linked here; shared tags: #stdlib, #types
- tuts/c/stdlib/stdint_stdbool_and_limits shared tags: #stdlib, #types
- tuts/python3/stdlib_module/types/CellType shared tags: #stdlib, #types
- tuts/python3/stdlib_module/types/ClassMethodDescriptorType shared tags: #stdlib, #types
- tuts/python3/stdlib_module/types/CodeType shared tags: #stdlib, #types