The Real Python Podcast cover image

Creating Tic-Tac-Toe With an AI Player & Shortcuts for Python Decorators

The Real Python Podcast

00:00

How to Use Decorators to Save Typing and Enable Reuse

Python developers can use decorator shortcuts to save typing and reuse. Ned Batchelder's post explains that decorators are just functions, which means you can call them. So instead of doing the copy and paste thing, you call the decorator as if it's a normal function with all those arguments. And then you use this variable as the decorator.

Play episode from 37:03
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app