3 ms·
A while back I used a similar technique to build out a "sinatra"-esque way to declare handlers in python http://sigusr2.net/2009/Mar/04/dispatching-with-with.ht
by apgwoz 17y ago
A while back I used a similar technique to build out a "sinatra"-esque way to declare handlers in python http://sigusr2.net/2009/Mar/04/dispatching-with-with.html http://sigusr2.net/2009/Mar/04/dispatching-with-with.html
- jcsalterego 17y agoSpeaking of Sinatra and Python, have you seen http://github.com/breily/juno http://github.com/breily/juno?
- apgwoz 17y agoI've not. While I'm a fan of decorators in practice, I'm not a fan of the syntax. Part of what makes Sinatra so interesting to me is the way you define your resources, which is what I was going for. I never actually built anything more than a small proof of concept demo, since ultimately the value of the technique is pretty minimal.
- llimllib 17y agoneat hack!