Re: [Python-ideas] Fwd: collections.Counter should implement fromkeys

2018-06-30 Thread Tim Peters
[Abe Dillon] > I haven't been part of the conversation for 15 years, but most of the argument > against the idea (yours especially) seem to focus on the prospect of a > constructor war and imply that was the original motivation behind actively > disabling the fromkeys method in Counters. I quoted

Re: [Python-ideas] grouping / dict of lists

2018-06-30 Thread Serhiy Storchaka
30.06.18 00:42, Guido van Rossum пише: On a quick skim I see nothing particularly objectionable or controversial in your PEP, except I'm unclear why it needs to be a class method on `dict`. Adding something to a builtin like this is rather heavy-handed. Is there a really good reason why it can'

Re: [Python-ideas] Should nested classes in an Enum be Enum members?

2018-06-30 Thread Serhiy Storchaka
29.06.18 03:25, Steven D'Aprano пише: On Thu, Jun 28, 2018 at 06:57:45AM +0300, Serhiy Storchaka wrote: Making a nested class a member you don't lost anything, because you always can make it not-nested if you don't want it be a member. You lose the ability to have Colors.RED.NestedClass

Re: [Python-ideas] Add a __cite__ method for scientific packages

2018-06-30 Thread Nick Coghlan
On 29 June 2018 at 12:14, Nathaniel Smith wrote: > On Thu, Jun 28, 2018 at 2:25 PM, Andrei Kucharavy > wrote: >> As for the list, reserving a __citation__/__cite__ for packages at the same >> level as __version__ is now reserved and adding a citation()/cite() function >> to the standard library s

Re: [Python-ideas] grouping / dict of lists

2018-06-30 Thread Nick Coghlan
On 30 June 2018 at 16:25, Guido van Rossum wrote: > On Fri, Jun 29, 2018 at 3:23 PM Michael Selik wrote: >> I included an alternate solution of a new class, collections.Grouping, >> which has some advantages. In addition to having less of that "heavy-handed" >> feel to it, the class can have a fe

Re: [Python-ideas] grouping / dict of lists

2018-06-30 Thread Chris Barker via Python-ideas
On Fri, Jun 29, 2018 at 10:53 AM, Michael Selik wrote: > I've drafted a PEP for an easier way to construct groups of elements from > a sequence. https://github.com/selik/peps/blob/master/pep-.rst > > I'm really warming to the: Alternate: collections.Grouping version -- I really like this as

Re: [Python-ideas] grouping / dict of lists

2018-06-30 Thread Nick Coghlan
On 1 July 2018 at 15:18, Chris Barker via Python-ideas wrote: > On Fri, Jun 29, 2018 at 10:53 AM, Michael Selik wrote: >> >> I've drafted a PEP for an easier way to construct groups of elements from >> a sequence. https://github.com/selik/peps/blob/master/pep-.rst >> > I'm really warming to t