3 ms·
Yep, it's best us case is basically acting as pythons anonymous function (since lambdas suck for everything but the most trivial things). Where in js flask mig
by HeyImAlex 12y ago
Yep, it's best us case is basically acting as pythons anonymous function (since lambdas suck for everything but the most trivial things).
Where in js flask might read app.route('/', function(){//do something}); python uses a decorator right above a regular function definition. The alternative is to manually add it after it's defined (in flask that's add_url_rule), but that kind of hides the intent of the function and is more cumbersome as you need to manually pass in the fn name.