Comment

Comment by devxpy

Well, You'll be happy to know that a decorator is literally just a function that takes another function as its first argument.

    @app.route(...)
    def login():
        ...


Is literally the same thing as -

    def login():
        ...

    login = app.route(login, ...)

Hopefully that clears up the air a bit?
parent devxpy 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton