[Python-ideas] Proposal: Query language extension to Python (PythonQL)

Terry Reedy tjreedy at udel.edu
Fri Mar 24 13:50:13 EDT 2017


On 3/24/2017 11:10 AM, Pavel Velikhov wrote:
> Hi folks!
>
>   We started a project to extend Python with a full-blown query language
> about a year ago. The project is call PythonQL, the links are given
> below in the references section. We have implemented what is kind of an
> alpha version now, and gained some experience and insights about why and
> where this is really useful. So I’d like to share those with you and
> gather some opinions whether you think we should try to include these
> extensions in the Python core.

No. PythonQL defines a comprehension-inspired SQL-like domain-specific 
(specialized) language.  Its style of packing programs into expressions 
is contrary to that of Python.  It appears to me that most of the added 
features duplicate ones already in Python (sorted, itertools, named 
tuples?).  I think it should remain a separate project with its own 
development group and schedule.

This is not to say that I would never use PQL.  I like he idea of a 
uniform method of accessing in-memory and on-disk date, and like 
Python's current method of making files an iterable of lines.  I believe 
the current DB API allows something similar.

I think that the misuse of coding cookies, which makes it unusable in 
code that already has a proper coding cookie, should be replaced by 
normal imports.  PQL expressions should be quoted and passed to the dsl 
processor, as done with SQL and other DSLs.

-- 
Terry Jan Reedy




More information about the Python-ideas mailing list