On this page
  1. inspect.getmro
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

inspect.getmro

Prev: inspect.getmodulename | Up: inspect | Next: inspect.getouterframes
Rel: inspect.ArgInfo, inspect.Arguments, inspect.Attribute, inspect.BlockFinder
Ref: docs.python.org — inspect.getmro
Tags: #public #python3 #stdlib #inspect


Import

import inspect
from inspect import getmro

Signature & Overview

inspect.getmro(cls)

Return tuple of base classes (including cls) in method resolution order.

Usage

import inspect

class A: pass
class B(A): pass

assert inspect.getmro(B) == (B, A, object)

Gotchas

REPL Inspect

from inspect import getmro
help(getmro)

Linked from

Related notes