On Wed, May 6, 2020 at 10:31 AM Alex Hall <alex.mojaki@gmail.com> wrote:
zip.shortest(...)  # same as zip(...)
zip.longest(...)
zip.checksame(...)

I presume that zip() would keep its current behavior, yes?

I kind of like this -- is there any precedent for it in the standard library?

The PEP seems to reject this saying:

The actual zip type is an undocumented implementation detail. Adding additional methods or constructors is really a much larger change that is not necessary to achieve the stated goal.

well, yes and no -- the first part indicates that we could totally change the type of the zip, as long as it's a collable that returns an iterator.

Whether adding additional methods is too large a change -- that's totally a matter of opinion.

> Having these alternative 'methods' would be similar to having different functions in itertools,
indeed -- same idea, different namepace.

-CHB

--
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython