Re: [Python-ideas] "given" vs ":=" in list comprehensions

2018-05-14 Thread Nick Coghlan
On 14 May 2018 at 08:24, Ed Kellett wrote: > On 2018-05-14 05:02, Nick Coghlan wrote: > > The same grammar adjustment that I believe will allow "given" to be used > as > > both a postfix keyword and as a regular name would also work for "where". > > However, "where"

Re: [Python-ideas] "given" vs ":=" in list comprehensions

2018-05-14 Thread Ed Kellett
On 2018-05-14 05:02, Nick Coghlan wrote: > The same grammar adjustment that I believe will allow "given" to be used as > both a postfix keyword and as a regular name would also work for "where". > However, "where" still has the problem of semantically conflicting with > SQL's use of it to

Re: [Python-ideas] "given" vs ":=" in list comprehensions

2018-05-13 Thread Nick Coghlan
On 12 May 2018 at 20:34, Andre Roberge wrote: > Sorry for chiming in so late; I was lurking using google groups and had to > subscribe to post - hence this new thread. > > I gather that *where* has been discarded as a possible new keywords given > its use as a function

Re: [Python-ideas] "given" vs ":=" in list comprehensions

2018-05-13 Thread Mark Dickinson
On Sun, May 13, 2018 at 1:34 AM, Andre Roberge wrote: > First example: single temporary assignment, done four different ways. > > 1) using := > > real_roots = [ (-b/(2*a) + (D:= sqrt( (b/(2*a))**2 - c/a), -b/(2*a) - D) > for a in range(10) >

Re: [Python-ideas] "given" vs ":=" in list comprehensions

2018-05-12 Thread Chris Angelico
On Sun, May 13, 2018 at 10:34 AM, Andre Roberge wrote: > Second example: multiple assignments. > > When we have multiple temporary assignments, the situation can be more > complicated. In the following series of examples, I will start in reverse > order compared to

[Python-ideas] "given" vs ":=" in list comprehensions

2018-05-12 Thread Andre Roberge
Sorry for chiming in so late; I was lurking using google groups and had to subscribe to post - hence this new thread. I gather that *where* has been discarded as a possible new keywords given its use as a function in numpy (