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

2017-03-27 Thread Pavol Lisy
On 3/27/17, Chris Angelico wrote: > On Mon, Mar 27, 2017 at 12:26 PM, Terry Reedy wrote: >> It might be possible (or not!) to make the clause-heading words like >> 'where' >> or 'groupby' (this would have to be one word) recognized as special only >> in >> the context of starting a new comprehens

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

2017-03-27 Thread Paul Moore
On 27 March 2017 at 10:54, Brice PARENT wrote: > I get it, but it's more a matter of perception. To me, the version I > described is just Python, while yours is Python + specific syntax. As this > syntax is only used in PyQL sub-language, it's not really Python any more... ... which is why I susp

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

2017-03-27 Thread Brice PARENT
Le 27/03/17 à 10:55, Pavel Velikhov a écrit : Hi Brice, On 27 Mar 2017, at 10:17, Brice PARENT > wrote: I prefer this a lot to the original syntax, and I really think this has much better chances to be integrated (if such an integration had to be done, and not kep

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

2017-03-27 Thread Pavel Velikhov
Hi Brice, > On 27 Mar 2017, at 10:17, Brice PARENT wrote: > > I prefer this a lot to the original syntax, and I really think this has much > better chances to be integrated (if such an integration had to be done, and > not kept as a separate module). > > Also, maybe managing this with classes

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

2017-03-26 Thread Wes Turner
On Sun, Mar 26, 2017 at 10:42 PM, Wes Turner wrote: > > > On Sun, Mar 26, 2017 at 10:02 AM, Nick Coghlan wrote: > >> On 26 March 2017 at 21:40, Pavel Velikhov >> wrote: >> > On 25 Mar 2017, at 19:40, Nick Coghlan wrote: >> >> Right, the target audience here *isn't* folks who already know how t

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

2017-03-26 Thread Wes Turner
On Sun, Mar 26, 2017 at 10:02 AM, Nick Coghlan wrote: > On 26 March 2017 at 21:40, Pavel Velikhov > wrote: > > On 25 Mar 2017, at 19:40, Nick Coghlan wrote: > >> Right, the target audience here *isn't* folks who already know how to > >> construct their own relational queries in SQL, and it defi

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

2017-03-26 Thread Chris Angelico
On Mon, Mar 27, 2017 at 12:26 PM, Terry Reedy wrote: > It might be possible (or not!) to make the clause-heading words like 'where' > or 'groupby' (this would have to be one word) recognized as special only in > the context of starting a new comprehension clause. The precedents for > 'keyword in c

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

2017-03-26 Thread Terry Reedy
On 3/26/2017 7:14 AM, Pavel Velikhov wrote: On 26 Mar 2017, at 07:23, Terry Reedy Someone mentioned the problem of adding multiple new keywords. Even 1 requires a proposal to meet a high bar; I think we average less than 1 new keyword per release in the last 20 years. Searching '\bgroup\b' ju

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

2017-03-26 Thread Pavel Velikhov
Hi Nick! > On 26 Mar 2017, at 18:02, Nick Coghlan wrote: > > On 26 March 2017 at 21:40, Pavel Velikhov wrote: >> On 25 Mar 2017, at 19:40, Nick Coghlan wrote: >>> Right, the target audience here *isn't* folks who already know how to >>> construct their own relational queries in SQL, and it def

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

2017-03-26 Thread Nick Coghlan
On 26 March 2017 at 21:40, Pavel Velikhov wrote: > On 25 Mar 2017, at 19:40, Nick Coghlan wrote: >> Right, the target audience here *isn't* folks who already know how to >> construct their own relational queries in SQL, and it definitely isn't >> folks that know how to tweak their queries to get

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

2017-03-26 Thread Pavel Velikhov
Hi Nick, Thanks for such a detailed response! > On 25 Mar 2017, at 19:40, Nick Coghlan wrote: > > First off, I think PythonQL (and PonyORM before it) is a very > interesting piece of technology. However, I think some of the answers > so far suggest we may need to discuss a couple of meta-iss

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

2017-03-26 Thread Pavel Velikhov
Terry, > On 26 Mar 2017, at 07:23, Terry Reedy wrote: > > On 3/25/2017 11:40 AM, Kyle Lahnakoski wrote: >> >> Pavel, >> >> I like PythonQL. I perform a lot of data transformation, and often find >> Python's list comprehensions too limiting; leaving me wishing for >> LINQ-like language features

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

2017-03-26 Thread Pavel Velikhov
Hi Michel! > On 25 Mar 2017, at 22:43, Michel Desmoulin wrote: > > Hello, > > I've been following PythonQL with interest. I like the clever hack using > Python encoding. It's definitely not something I would recommend to do > for an inclusion in Python as it hijack the Python encoding method, >

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

2017-03-26 Thread Pavel Velikhov
Hi Mark, > On 25 Mar 2017, at 19:54, Mark E. Haase wrote: > > Hi Pavel, > > This is a really impressive body of work. I had looked at this project in the > past but it is great to get back up to speed and see all the progress made. > > I use Python + databases almost every day, and the major

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

2017-03-26 Thread Pavel Velikhov
Hi David > On 25 Mar 2017, at 20:08, David Mertz wrote: > > I think it's extraordinarily unlikely that a big change in Python syntax to > support query syntax will ever happen. Moreover, I would oppose such a > change myself. > > But just a change also really is not necessary. Pandas alread

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

2017-03-26 Thread Pavel Velikhov
> On 25 Mar 2017, at 15:51, Gerald Britton wrote: > > On 25 March 2017 at 11:24, Pavel Velikhov > wrote: > > No, the current solution is temporary because we just don’t have the > > manpower to > > implement the full thing: a real system that will rewrite parts of PythonQL >

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

2017-03-25 Thread Terry Reedy
On 3/25/2017 11:40 AM, Kyle Lahnakoski wrote: Pavel, I like PythonQL. I perform a lot of data transformation, and often find Python's list comprehensions too limiting; leaving me wishing for LINQ-like language features. As an alternative to extending Python with PythonQL, Terry Reedy suggested

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

2017-03-25 Thread Michel Desmoulin
Hello, I've been following PythonQL with interest. I like the clever hack using Python encoding. It's definitely not something I would recommend to do for an inclusion in Python as it hijack the Python encoding method, which prevent your from... well choosing an encoding. And requires to have a fi

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

2017-03-25 Thread David Mertz
I think it's extraordinarily unlikely that a big change in Python syntax to support query syntax will ever happen. Moreover, I would oppose such a change myself. But just a change also really is not necessary. Pandas already abstracts all the things mentioned using only Python methods. It is tr

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

2017-03-25 Thread Mark E. Haase
Hi Pavel, This is a really impressive body of work. I had looked at this project in the past but it is great to get back up to speed and see all the progress made. I use Python + databases almost every day, and the major unanswered question is what benefit does dedicated language syntax have over

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

2017-03-25 Thread Nick Coghlan
First off, I think PythonQL (and PonyORM before it) is a very interesting piece of technology. However, I think some of the answers so far suggest we may need to discuss a couple of meta-issues around target audiences and available technical options before continuing on. I'm quoting Gerald's post

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

2017-03-25 Thread Kyle Lahnakoski
Pavel, I like PythonQL. I perform a lot of data transformation, and often find Python's list comprehensions too limiting; leaving me wishing for LINQ-like language features. As an alternative to extending Python with PythonQL, Terry Reedy suggested interpreting a DSL string, and Pavel Velikhov a

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

2017-03-25 Thread Gerald Britton
> > On 25 March 2017 at 11:24, Pavel Velikhov > wrote: > > No, the current solution is temporary because we just don’t have the > > manpower to > > implement the full thing: a real system that will rewrite parts of > PythonQL > > queries and > > ship them to underlying databases. We need a real qu

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

2017-03-25 Thread Pavel Velikhov
Hi Paul! > On 25 March 2017 at 11:24, Pavel Velikhov wrote: >> No, the current solution is temporary because we just don’t have the >> manpower to >> implement the full thing: a real system that will rewrite parts of PythonQL >> queries and >> ship them to underlying databases. We need a real que

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

2017-03-25 Thread Pavel Velikhov
> On 25 Mar 2017, at 10:58, Brice PARENT wrote: > > Hello! > > Hello! > If I had to provide a unified way of dealing with data, whatever its source > is, I would probably go with creating an standardized ORM, probably based on > Django's or PonyORM, because: > > - it doesn't require any cha

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

2017-03-25 Thread Paul Moore
On 25 March 2017 at 11:24, Pavel Velikhov wrote: > No, the current solution is temporary because we just don’t have the > manpower to > implement the full thing: a real system that will rewrite parts of PythonQL > queries and > ship them to underlying databases. We need a real query optimizer and

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

2017-03-25 Thread Pavel Velikhov
> On 25 Mar 2017, at 02:19, Greg Ewing wrote: > > Terry Reedy wrote: >> PQL expressions should be quoted and passed to the dsl processor, as done >> with SQL and other DSLs. > > But embedding one language as quoted strings inside another > is a horrible way to program. > > I really like the i

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

2017-03-24 Thread Greg Ewing
Terry Reedy wrote: PQL expressions should be quoted and passed to the dsl processor, as done with SQL and other DSLs. But embedding one language as quoted strings inside another is a horrible way to program. I really like the idea of a data manipulation language that is seamlessly integrated w

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

2017-03-24 Thread Pavel Velikhov
Hi Terry! Thanks for your feedback, I have a couple comments below. > On 24 Mar 2017, at 20:50, Terry Reedy wrote: > > 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 cal

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

2017-03-24 Thread Terry Reedy
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 gaine

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

2017-03-24 Thread Pavel Velikhov
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