💾 Archived View for dcreager.net › languages › python › typing › any.gmi captured on 2024-12-17 at 09:34:04. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
The Any type is the canonical gradual type.
Any represents an unknown static type. It denotes some unknown set of values.
‘typing.Any’ is a name for the Any type that you can use in Python type annotations.
Python typing is gradual, which means that a program type-checks if there is *some* materialization of gradual types that type-checks. Hence:
Every type is assignable to ‘Any’, and ‘Any’ is assignable to every type.