![](https://secure.gravatar.com/avatar/b60683e6dacd4556ae15430a7c9b6f13.jpg?s=120&d=mm&r=g)
--- Aahz <aahz@pythoncraft.com> wrote:
Think of it this way: if Python requires you to use a library for regex manipulation, what makes SQL-like data processing sufficiently special that it belongs in the language itself?
There is a difference. Regexes would never leverage python expressions *inside* the regex, even if they were more directly integrated into the language like Perl. (And, for the record, I prefer Python's philosophy to make regexes a module, but I do appreciate the short name, re, and the fact that it's battery included). In the case of SQL, I can imagine something like this: def convert_to_euros(salary): ... result_set = [[[ select deptno, total(convert_to_euros(salary)) from emp where country = 'France' group by deptno ]]] # where emp is a list of dictionaries Obviously, I understand that you can solve this problem in Python now, but you either have to do this: 1) Use more bulky way to describe the expression: sql(..., criteria=lambda row: row['country'] == 'France') 2) Rely on some library to parse the SQL for you, which is good enough for the year 2007, but I wonder why the Python interpreter itself couldn't interpret the SQL to bytecode (at startup time) just as easily as, say, SQLAlchemy or sqlite, does at runtime. ____________________________________________________________________________________Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/