Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Enhancing Decorators with Type Annotations - Techniques and Best Practices

PyCon US via YouTube

Overview

Explore techniques and best practices for enhancing Python decorators with type annotations in this 21-minute PyCon US talk. Learn how to leverage type hints to improve decorator clarity, catch errors early, and reduce debugging time. Discover practical implementations using advanced typing features like TypeVarTuple, Protocol, ParamSpec, Concatenate, and Type Parameter Syntax. Gain insights into making decorators more robust and user-friendly, addressing common questions about argument passing, function targeting, and return type changes. Apply these strategies to create well-typed decorators that enhance code quality and guide developers towards correct usage in their projects.

Syllabus

Talks - Koudai Aono: Enhancing Decorators with Type Annotations: Techniques and Best Practices

Taught by

PyCon US

Reviews

Start your review of Enhancing Decorators with Type Annotations - Techniques and Best Practices

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.