On Wed, May 6, 2020 at 10:31 AM Alex Hall <alex.moj...@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
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/5EC4BLXEUZWEE2D7PP43WK6BAGEVFRPB/ Code of Conduct: http://python.org/psf/codeofconduct/