[Python-ideas] Re: zip(x, y, z, strict=True)

2020-04-23 Thread Andrew Barnert via Python-ideas
> On Apr 22, 2020, at 14:09, Steven D'Aprano wrote: > > On Wed, Apr 22, 2020 at 10:33:24AM -0700, Andrew Barnert via Python-ideas > wrote: > >> If that is your long-term goal, I think you could do it in three steps. > > I think the first step is a PEP. This is not a small change that can be

[Python-ideas] Re: Keyword arguments self-assignment

2020-04-23 Thread Sebastian Berg
On Thu, 2020-04-23 at 14:47 -0400, Kyle Lahnakoski wrote: > I reviewed my code: of 20,360 keyword arguments, 804 (4%) are have > the > x=x format. I do not know if this is enough to justify such a > proposal, Is that script somewhere? I got a bit curious and wasted some time on making my own

[Python-ideas] Re: Keyword arguments self-assignment

2020-04-23 Thread Stephen J. Turnbull
Kyle Lahnakoski writes: > Maybe aligning variable names with function keyword parameteres is an > anti-pattern, but I have not seen it. I consider this an anti-pattern for my use case. I review a lot of different students' similar code for different applications. They borrow from each

[Python-ideas] Re: zip(x, y, z, strict=True)

2020-04-23 Thread Nathan Schneider
On Thu, Apr 23, 2020 at 3:50 PM Eric Fahlgren wrote: > On Wed, Apr 22, 2020 at 12:23 PM David Mertz wrote: > >> On Wed, Apr 22, 2020, 4:24 AM Antoine Pitrou >> >>> But, as far as I'm concerned, the number of times where I took >>> advantage of zip()'s current acceptance of heteregenously-sized

[Python-ideas] Re: Keyword arguments self-assignment

2020-04-23 Thread Dan Sommers
On Fri, 24 Apr 2020 07:46:43 +1000 Steven D'Aprano wrote: > On Thu, Apr 23, 2020 at 04:24:18PM -0400, Dan Sommers wrote: > > On Thu, 23 Apr 2020 14:47:48 -0400 > > Kyle Lahnakoski wrote: > > > > Many of the function keyword parameters I deal with are data property > > > names; so it makes

[Python-ideas] Re: Keyword arguments self-assignment

2020-04-23 Thread Steven D'Aprano
On Thu, Apr 23, 2020 at 04:24:18PM -0400, Dan Sommers wrote: > On Thu, 23 Apr 2020 14:47:48 -0400 > Kyle Lahnakoski wrote: > > Many of the function keyword parameters I deal with are data property > > names; so it makes sense that the data has the same name throughout the > > codebase.  The

[Python-ideas] Re: Keyword arguments self-assignment

2020-04-23 Thread Dan Sommers
On Thu, 23 Apr 2020 14:47:48 -0400 Kyle Lahnakoski wrote: > > On 2020-04-19 07:23, Richard Damon wrote: > > There is also the issue that if we are building a function that might be > > used with another function, we will have an incentive to name our > > keyword parameters that there is a

[Python-ideas] Re: zip(x, y, z, strict=True)

2020-04-23 Thread Eric Fahlgren
On Wed, Apr 22, 2020 at 12:23 PM David Mertz wrote: > On Wed, Apr 22, 2020, 4:24 AM Antoine Pitrou > >> But, as far as I'm concerned, the number of times where I took >> advantage of zip()'s current acceptance of heteregenously-sized inputs >> is extremely small. In most of my uses of zip(), a

[Python-ideas] Re: Keyword arguments self-assignment

2020-04-23 Thread Kyle Lahnakoski
On 2020-04-19 07:23, Richard Damon wrote: There is also the issue that if we are building a function that might be used with another function, we will have an incentive to name our keyword parameters that there is a reasonable chance would also be passed to that other function with the same