[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Brandt Bucher
In the last 24 hours, this thread has grown a bit beyond my capacity to continue several different lines of discussion with each individual. I count 22 messages from 14 different people since my last reply, and I assure you that I've carefully read each response and am considering them as I

[Python-Dev] Re: [core-workflow] Core Workflow change: new commit to previously approved PR now requires re-review

2020-05-15 Thread Daniel Scott via Python-Dev
Sent from Yahoo Mail on Android On Fri, May 15, 2020 at 6:33 PM, Mariatta wrote: X-post to python-committers, python-dev, and core-workflow mailing list I have just deployed a change to bedevere-bot to address the security concern related to

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread David Mertz
Ok. That's true. It's technically correct as phrased. I glossed over the "compared to" aspect. I still think it could be made more clear. On Fri, May 15, 2020, 4:40 PM MRAB wrote: > On 2020-05-15 20:36, David Mertz wrote: > > On Fri, May 15, 2020 at 12:55 PM Eric V. Smith >

[Python-Dev] Core Workflow change: new commit to previously approved PR now requires re-review

2020-05-15 Thread Mariatta
X-post to python-committers, python-dev, and core-workflow mailing list I have just deployed a change to bedevere-bot to address the security concern related to automerging.( https://github.com/python/core-workflow/issues/325) Previously, if core dev has approved the PR and applied the

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Henk-Jaap Wagenaar
On Fri, 15 May 2020 at 21:50, Eric V. Smith wrote: > I fear that my comment on some text in the PEP was lost amidst the > voting, so I'm repeating it here. This will probably screw up some > threading, but this is the oldest message I have to reply to. > > The PEP says "At most one additional

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Eric V. Smith
I fear that my comment on some text in the PEP was lost amidst the voting, so I'm repeating it here. This will probably screw up some threading, but this is the oldest message I have to reply to. The PEP says "At most one additional item may be consumed from one of the iterators when compared

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread MRAB
On 2020-05-15 20:36, David Mertz wrote: On Fri, May 15, 2020 at 12:55 PM Eric V. Smith > wrote: Also: The PEP says "At most one additional item may be consumed from one of the iterators when compared to normal zip usage." I think this should be prefaced

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread David Mertz
On Fri, May 15, 2020 at 12:55 PM Eric V. Smith wrote: > Also: The PEP says "At most one additional item may be consumed from one > of the iterators when compared to normal zip usage." I think this should > be prefaced with "If ValueError is raised ...". Also, why does it say "at > most one

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Gregory P. Smith
On Fri, May 15, 2020 at 11:55 AM Henk-Jaap Wagenaar < wagenaarhenkj...@gmail.com> wrote: > I'll join in with the fun... > > zip(strict=True) +1 > itertools.zip_strict() +0 > Agreed. The best way to reduce accidental incorrect use of the builtin is to make the builtin capable of doing what a

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Guido van Rossum
On Fri, May 15, 2020 at 11:57 Henk-Jaap Wagenaar wrote: > I'll join in with the fun... > > zip(strict=True) +1 > itertools.zip_strict() +0 > zip(mode='strict') -1 > zip.strict() -1 > Those are exactly how I would vote. -- --Guido (mobile) ___

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Henk-Jaap Wagenaar
I'll join in with the fun... zip(strict=True) +1 itertools.zip_strict() +0 zip(mode='strict') -1 zip.strict() -1 On Fri, 15 May 2020 at 19:12, Paul Moore wrote: > [Cut the previous votes because someone's quoting didn't survive my > email client and I can't be bothered fixing it] > > If

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Paul Moore
[Cut the previous votes because someone's quoting didn't survive my email client and I can't be bothered fixing it] If everyone else is doing it... itertools.zip_strict() +1 zip(strict=True) -0 zip.strict() -0.5 zip(mode='strict') -1 Paul ___

[Python-Dev] Summary of Python tracker Issues

2020-05-15 Thread Python tracker
ACTIVITY SUMMARY (2020-05-08 - 2020-05-15) Python tracker at https://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open7468 ( +9) closed 44917 (+60) total 52385 (+69) Open issues

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Eric V. Smith
On 5/15/2020 11:56 AM, Chris Angelico wrote: On Sat, May 16, 2020 at 1:54 AM Antoine Pitrou wrote: On Fri, 15 May 2020 10:46:25 -0400 David Mertz wrote: 1. +1 itertools.zip_strict function 2. +1 zip.strict(*args) 3. +1 zip(*args, mode='strict') # mode='shortest' by default 4. +0 zip(*args,

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Rhodri James
On 15/05/2020 16:56, Chris Angelico wrote: On Sat, May 16, 2020 at 1:54 AM Antoine Pitrou wrote: On Fri, 15 May 2020 10:46:25 -0400 David Mertz wrote: 1. +1 itertools.zip_strict function 2. +1 zip.strict(*args) 3. +1 zip(*args, mode='strict') # mode='shortest' by default 4. +0 zip(*args,

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Chris Angelico
On Sat, May 16, 2020 at 1:54 AM Antoine Pitrou wrote: > > On Fri, 15 May 2020 10:46:25 -0400 > David Mertz wrote: > > > > > 1. +1 itertools.zip_strict function > > > 2. +1 zip.strict(*args) > > > 3. +1 zip(*args, mode='strict') # mode='shortest' by default > > > 4. +0 zip(*args, strict=True) >

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Antoine Pitrou
On Fri, 15 May 2020 06:06:00 - "Brandt Bucher" wrote: > Ethan Furman wrote: > > Can you do those with _pydecimal? If performance were an issue anywhere I > > would expect to see it with number crunching. > > No difference, probably because those methods look like they spend most of >

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Antoine Pitrou
On Fri, 15 May 2020 10:46:25 -0400 David Mertz wrote: > > > 1. +1 itertools.zip_strict function > > 2. +1 zip.strict(*args) > > 3. +1 zip(*args, mode='strict') # mode='shortest' by default > > 4. +0 zip(*args, strict=True) > > > > Mostly I agree with Steven on relative preference: > >

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Paul Moore
On Fri, 15 May 2020 at 16:01, David Mertz wrote: > > I'm a little frustrated by the tone in which the PEP dismisses the option > that is most supported in the discussion. It fine for Brandt to have a > different preference himself, but I think it ought to be presented more > neutrally.

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread David Mertz
I'm a little frustrated by the tone in which the PEP dismisses the option that is most supported in the discussion. It fine for Brandt to have a different preference himself, but I think it ought to be presented more neutrally. On Fri, May 15, 2020, 10:20 AM Steven D'Aprano > 1. +1

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Chris Jerdonek
Here’s another advantage of having a separate function that I didn’t see acknowledged in the PEP: If strict behavior is a better default for a zip-like function than non-strict, then choosing a new function would let you realize that better default. In contrast, by adding a new argument to the

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Steven D'Aprano
On Fri, May 15, 2020 at 09:56:03AM -0400, Paul Ganssle wrote: > I'm on the fence about using a separate function vs. a keyword argument > (I think there is merit to both), but one thing to note about the > separate function suggestion is that it makes it easier to write > backwards compatible code

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Steven D'Aprano
On Fri, May 15, 2020 at 08:17:12AM +0100, Paul Moore wrote: > 1. Why do we want to "tempt" people to error when handling mismatched > lengths? Certainly letting people catch errors easily is worthwhile, > but rejecting arguments of different lengths may well *not* be an > error ("be lenient in

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Paul Ganssle
I'm on the fence about using a separate function vs. a keyword argument (I think there is merit to both), but one thing to note about the separate function suggestion is that it makes it easier to write backwards compatible code that doesn't rely on version checking. With `itertools.zip_strict`,

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Stephen J. Turnbull
Brandt Bucher writes: > Still agreed. But I think they would be *better* served by the > proposed keyword argument. > > This whole sub-thread of discussion has left me very confused. Was > anything unclear in the PEP's phrasing here? I thought it was quite clear. Those of us who disagree

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Paul Moore
On Fri, 15 May 2020 at 07:10, Brandt Bucher wrote: > > This whole sub-thread of discussion has left me very confused. Was anything > unclear in the PEP's phrasing here? If so, I'd like to improve it. The > original quote is: "The goal here is not just to provide a way to catch bugs, > but to

[Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-15 Thread Brandt Bucher
Ethan Furman wrote: > Can you do those with _pydecimal? If performance were an issue anywhere I > would expect to see it with number crunching. No difference, probably because those methods look like they spend most of their time doing string manipulation: ``` $ export PYPERFSETUP='from