DEV Community

Super Kai (Kazuya Ito)
Super Kai (Kazuya Ito)

Posted on • Edited on

T - Glossary (Python)

Buy Me a Coffee

type checker

  • is a tool to check static types.
  • is mypy, pyright, pyrefly, ty, etc:
  • can also be called static type checker but I use type checker because it's shorter.

type hint

  • is an optional static type created by a non-union type or union type for a variable, or function parameter or return value.
  • is for type checkers so error doesn't occur with PyCo even if a type hint is wrong.
  • should be used as specific as possible.
  • can be done with ':', with one or more types and with or without '|' and '[]'.

typed

  • means to have an explicit type as a type hint.

Top comments (0)