
Steve Howell <showell30@yahoo.com> wrote:
Josiah wrote: You may be incorrect about the following, or I may just be understanding your points, but I'm not wrong about any of these, since I'm just characterizing my own feelings:
1) I don't want rowexpr to be pretty much an alias for lambda; I actually want it to be more powerful.
Technically speaking, lambda is sufficient for turing completeness, so the only thing to be gained is a reduction in what you write. As you offer... predicate = rowexpr: manipulation(column1) > value1 and \ column2 < value2 predicate = lambda row: manipulation(row['column1']) > value1 and \ row['column2'] < value) Is that reduction worthwhile? I personally don't think so, but my list comprehensions tend to have fairly minimal predicates. One thing to take into consideration is that Guido has previously shot down 'order by' syntax in list comprehensions and generator expressions because he didn't think that they were Pythonic (I seem to remember 'ugly' and 'worthless', but maybe that was my response to them).
2) I'm not sweating performance here; I'm already using an interpreted language. I don't want Python to be faster for my day-to-day tasks; I want it to be more expressive. I even--and I'll dare say--want the language to be BIGGER.
That's fine, but realize that Python 3.0 is moving towards a smaller, clearer language; see the dictionary changes, range/xrange, exception handling, etc.
3) I'm not ignorant of the resistance to macro expansions in Python, but I do think a year-2010 Python interpreter could compile SQL syntax directly into bytecode.
It could, but I would happily bet you $100 that it won't. If you are really intent on getting this, despite the arguments against it (from everyone so far), you could add your own syntax with logix, which will handle arbitrary SQL statement and compile it into Python bytecode (given sufficient information on how to do so). Yes, that's a cop-out, but sometimes the only way people get the language that they want is if they can add syntax at their whim. I've personally found that while I disagree with Guido on very many things related to Python, I'm usually too lazy to bother to add syntax I think I may need when I'm able to (with very minimal effort) write a helper function or two to do basically everything I need in lieu of syntax. - Josiah