Skip to content
All lessons

Tech Insights· docs.python.org

: a type T can be annotated with metadata x via the typehint Annotated[T, x]. This metadata can be used for either static ana...

: a type T can be annotated with metadata x via the typehint Annotated[T, x]. This metadata can be used for either static analysis or at runtime. If a library (or tool) encounters a typehint Annotated[T, x] and has no special logic for metadata x, it should ignore it and simply treat the type as T.

Shared by

Read on docs.python.org
  • Python
  • Typing

Book a call

Lessons like this one
shape how we build.

Tell us what you’re building. In one call, we’ll show you how our team would approach it.

Tell us what you’re building, and we’ll show you how we’d approach it.

Still prefer the good old email? Contact us