Re: [Python-ideas] Where should grouping() live (was: grouping / dict of lists)

2018-07-06 Thread Cammil Taank
The way I see grouping is as an aggregation operation. As such, in my head, grouping is similar to min/max. However, if builtins are a no-go, then I feel I need to think a little outside the box: Is there a possibility that there will be desired many more aggregate functions in the near future?

Re: [Python-ideas] Proposal: A Reduce-Map Comprehension and a "last" builtin

2018-04-07 Thread Cammil Taank
s not sit terribly with me. Cammil On 7 April 2018 at 00:49, Steven D'Aprano <st...@pearwood.info> wrote: > On Fri, Apr 06, 2018 at 03:27:45PM +, Cammil Taank wrote: > > I'm not sure if my suggestion for 572 has been considered: > > > > ``name! expression`` > > &

Re: [Python-ideas] Proposal: A Reduce-Map Comprehension and a "last" builtin

2018-04-06 Thread Cammil Taank
I'm not sure if my suggestion for 572 has been considered: ``name! expression`` I'm curious what the pros and cons of this form would be (?). My arguments for were in a previous message but there do not seem to be any responses to it. Cammil On Fri, 6 Apr 2018, 16:14 Guido van Rossum,

[Python-ideas] PEP 572: Statement-Local Name Bindings, take three!

2018-03-27 Thread Cammil Taank
> > ... From here, > the most important concern and question is: Is there any other syntax > or related proposal that ought to be mentioned here? I am not sure if this is valid, but perhaps this is an alternative syntax which might be simpler: ``name! expr`` So for example, instead of:

[Python-ideas] In-place assignment for "boolean or"?

2018-03-26 Thread Cammil Taank
Hi, I find a common idiom in Python is: x = x or 'some other value' This is highly reminiscent of the problem inplace operators solve. Would it be a good idea to consider an inplace operator for this, perhaps: x or= 'some other value' ? Thanks, Cammil

[Python-ideas] Inplace assignment for "boolean or"?

2018-03-25 Thread Cammil Taank
Hi, I find a common idiom in Python is: x = x or 'some other value' This is highly reminiscent of the problem inplace operators solve. Would it be a good idea to consider an inplace operator for this, perhaps: x or= 'some other value' ? Thanks, Cammil