3 ms·
So basically you're just faking blocks?
by judofyr 18y ago
So basically you're just faking blocks?
- apgwoz 18y agoI guess to some degree, yes. It wouldn't be necessary to do any of this of course if Python had a multi-line lambda, since you could instead just say: 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.
- judofyr 18y agoI 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.
- apgwoz 18y agoOh, I didn't take it as being harsh. It just made me realize, that despite it being interesting, the only thing it really adds is "coolness"