3 ms·
This one trips up every podcast host and blogger. It is not a global object, it just pretends to be with some wrapper magic. Like an attribute method it is not
This one trips up every podcast host and blogger. It is not a global object, it just pretends to be with some wrapper magic. Like an attribute method it is not a simple variable.
Which is even more magic... I don't get why the request and context isn't just passed as parameters. Explicit is better than implicit!
> Explicit is better than implicit!
Only if you want DRY to mean "Do repeat yourself".
Agree: passing the request with the full context as parameters to the handler function seems like a more explicit approach.
Which is hardly unique to flask. A scoped bean in Spring is the same concept, if expressed in a much more verbose manner.