2 ms·
app.route("/") is just a function call which will be run by Python on module import, like any other function that you call in the top level of your module. The
by mquander 12y ago
app.route("/") is just a function call which will be run by Python on module import, like any other function that you call in the top level of your module.
The return value of the function is a decorator, so then the @ syntax applies it to the succeeding function. In the process of applying the decorator, it adds the route to the dictionary. That's also on module import.