Python Decorators Explained
Published in
5 min readDec 19, 2020
If you’ve spent even a little bit of time using common Python frameworks, such as Flask, you’ve undoubtedly seen decorators in use. These little tags are placed on top of a function declaration to indicate that it’s used for something special. This simple example from the Flask web site shows off a typical use case:
app = Flask(__name__)@app.route('/')
def hello():
name =…