Lesson 15 of 18 · about 18 minutes
Decorators and Closures 🎁
Decorators and Closures 🎁 Functions are values: you can pass them around, return them and wrap them. A decorator is a function that takes a function and returns an improved one. import time, functools def timed(func): @functools.wraps(func) def…
This lesson is part of Pythonaut Pro. The full Launchpad track is free forever, so you can start there and come back.