Skip to content

Generics

Coming soon

Write reusable generic functions and classes using TypeVar and Python 3.12 syntax.

You'll be able to

  • Explain why generics are necessary for reusable components
  • Write generic functions using Python 3.12 def f[T](x: T) -> T syntax
  • Constrain type variables to specific bounds

Coming soon

This lesson is being written. The Telegram channel announces new lessons as they open.