3 ms·
What do you mean by "reusable"? You're basically using Python as if it were Lisp, which is kind of ugly :)
by bad_user 16y ago
What do you mean by "reusable"?
You're basically using Python as if it were Lisp, which is kind of ugly :)
- jerf 16y agoThe "qeury" has been reified as data. Now you can do whatever you want to it, including assign it to a variable. Sometimes the ugly tradeoff is OK, even in Python. In this case it is still less ugly than the code it is replacing, if you write correct code. Doing one little piddly-ass thing (running one method), then copy/pasting in the same four lines of error handling after every single one, well, it may be aesthetically pleasing on your screen but it's far uglier than what I've shown. Python has many advantages, but it isn't perfect.