Re:A small fast and cute web framework in Python.
by doublethink on Saturday May 26, 2012 @07:20PM
(#4028683)
The Play framework (java) also does this:
https://github.com/playframework/play/blob/master/framework/...
See "renderTemplate(String templateName, Map<String,Object> args)" for a good example.
Re:A small fast and cute web framework in Python.
by jimhoff11 on Saturday May 26, 2012 @02:04PM
(#4027902)
I noticed that too. A truly clever hack. (I mean hack in a good way.)
This mechanism is quite good for ensuring every request proper gets a response, though it also allows dodgy exception handling to interfere with processing. A discussion on the merits of exceptions themselves is beyond the scope of this comment. :)