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

2020年5月15日 09:21:29 -0700

On Sat, May 16, 2020 at 1:54 AM Antoine Pitrou <[email protected]> wrote:
>
> On 2020年5月15日 10:46:25 -0400
> David Mertz <[email protected]> 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:
> >
> > itertools.zip_strict() +1
> > zip.strict() +0.5
> > zip(mode='strict') +0
> > zip(strict=True) -0.5
>
> For me:
>
> * zip(strict=True) +1
> * zip(mode='strict') -0
> * itertools.zip_strict() -0.5
> * zip.strict() -1 (but really, I'd like to make this -1e10)
>
Since we're posting:
itertools.zip_strict() +1
zip.strict() +0.1
zip(strict=True) -0.5
zip(mode='strict') -1
ChrisA
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/JFPAP6TKMYOJNLVRN52RPN6432FDY2N4/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to