Dispatching With "with"
sigusr2.net
sigusr2.net
app.get('/', lambda req: whatever)
Though, now that I think about it, I guess there's no reason not to just do: def something(request): pass
app.get('/', something)
or better still @app.get('/')
def something(request): pass
I just thought using 'with' was an interesting hack.Sorry if I sounded a little harsh; it is an intersting hack and I really appreciate that you shared it with us. In fact, I love hacking around with languages (okay, it's mostly Ruby) and do weird/cool things.