Re: [Python-ideas] Repr of lambda

2017-12-20 Thread Chris Barker
On Mon, Dec 18, 2017 at 5:31 AM, Steve Barnes wrote: > I see it as showing that the information is already available to anybody > who needs it so I question the usefulness of changing repr (for > everybody) > @dataclass > class C: > a: "the a parameter" # field with no default > b: "anoth

Re: [Python-ideas] Repr of lambda

2017-12-20 Thread Brett Cannon
I'm in the middle of moving, so I'm not planning to take this any farther than this email unless someone explicitly brings up an issue by emailing Python-ideas-owner where Titus can help anyone out. On Wed, Dec 20, 2017, 16:11 Steven D'Aprano, wrote: > On Wed, Dec 20, 2017 at 03:55:01PM -0500, F

Re: [Python-ideas] Repr of lambda

2017-12-20 Thread Steven D'Aprano
On Wed, Dec 20, 2017 at 03:55:01PM -0500, Franklin? Lee wrote: > Wow, that's way too aggressive for this list. Hair-trigger sensitivity to "aggressiveness" is itself a form of aggression, because it leads to unfair accusations of aggressiveness and other over-reactions, and forces people to "wa

Re: [Python-ideas] Support floating-point values in collections.Counter

2017-12-20 Thread Franklin? Lee
On Mon, Dec 18, 2017 at 6:51 PM, Joel Croteau wrote: > It would be useful in many scenarios for values in collections.Counter to be > allowed to be floating point. I know that Counter nominally emulates a > multiset, which would suggest only integer values, but in a more general > sense, it could

Re: [Python-ideas] Support floating-point values in collections.Counter

2017-12-20 Thread Ned Batchelder
On 12/20/17 5:05 AM, Paul Moore wrote: On 20 December 2017 at 03:09, Joel Croteau wrote: Well here is some code I wrote recently to build a histogram over a weighted graph, before becoming aware that Counter existed (score is a float here): from collections import defaultdict total_score_by_d

Re: [Python-ideas] Repr of lambda

2017-12-20 Thread Franklin? Lee
On Mon, Dec 18, 2017 at 8:31 AM, Steve Barnes wrote: > > On 18/12/2017 11:43, Steven D'Aprano wrote: >> On Mon, Dec 18, 2017 at 07:54:17AM +, Steve Barnes wrote: >> >>> Isn't this exactly the sort of information already available via >>> inspect.getardspec, inspect.getsourcelines & inspect.get

Re: [Python-ideas] Support floating-point values in collections.Counter

2017-12-20 Thread Paul Moore
On 20 December 2017 at 03:09, Joel Croteau wrote: > Well here is some code I wrote recently to build a histogram over a weighted > graph, before becoming aware that Counter existed (score is a float here): > > from collections import defaultdict > > total_score_by_depth = defaultdict(float) > tota