Raymond Hettinger added the comment: +1 for the decorator idea. It feels very natural.
A little off topic, I do not like the with-statement example that we currently have in the docs. I think it is bad design to put some much code inside with-block. In the micro-webframeworks, we register functions separately from launching the server. The same practice should apply here as well. ---------- nosy: +rhettinger _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7769> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com