PyDocs

Nav

Development Tools

Any

typing

data (source)
Special type indicating an unconstrained type.

- Any is assignable to every type.
- Any assumed to have all methods and attributes.
- All values are assignable to Any.

Note that all the above statements are true from the point of view of
static type checkers. At runtime, Any cannot be used with instance
checks.
Changed in 3.11
  • 3.11: Any can now be used as a base class. This can be useful for avoiding type checker errors with classes that can duck type anywhere or are highly dynamic.
0 Examples
No examples for typing/Any.
See Also
No see-alsos for typing/Any
0 Notes
No notes for Any