Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I thought what the parent comment meant was that there's little to no magic in Flask compared to some macro-framework like Django/Spring. Can you get any more explicit than Flask and still be called a framework, without hitting the socket levels?


There's a bit of magic in Flask - the global object is an example.


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.


Well flask did evolve of Werkzeug a utility wrapper around wsgi, in response to bottlepy.

I also find a lot of the "magic" is found in flask extensions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: