The Nerd Nook

The Nerd Nook

Function vs Class-Based Decorators in Python – Which Should You Use?

Discover the key differences between function-based and class-based Python decorators. Learn when to use each with examples to level up your coding skills.

Josh Wenner's avatar
Josh Wenner
Jan 07, 2025
∙ Paid

You may have seen or already know how decorators work, that’s great! But when most of us think about decorators what comes to mind is actually function-based.

The function based decorators are what we…

User's avatar

Continue reading this post for free, courtesy of Josh Wenner.

Or purchase a paid subscription.
© 2026 The Nerd Nook · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture