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

typing.Any

Prev: typing.Annotated | Up: typing | Next: typing.assert_never
Rel: typing.AbstractSet, typing.Annotated, typing.assert_never, typing.assert_type
Ref: docs.python.org — typing.Any
Tags: #public #python3 #stdlib #typing


Import

import typing
from typing import Any

Signature & Overview

typing.Any(*args, **kwargs)

Special type indicating an unconstrained type.

Usage

from typing import Any

def log_anything(value: Any) -> str:
    return repr(value)

assert log_anything(42) == "42"

Gotchas

REPL Inspect

from typing import Any
help(Any)

Linked from

Related notes