On 2020-05-01 3:10 p.m., Brandt Bucher wrote:
I have pushed a first draft of PEP 618: https://www.python.org/dev/peps/pep-0618 Please let me know what you think – I'd love to hear any *new* feedback that hasn't yet been addressed in the PEP!
What about using an optional kwarg for a handler for mismatched lengths? I made a post about it on the other thread and it's not addressed in the PEP. It'd make zip capable of doing zip_shortest, zip_equal (aka zip(strict=True)) and zip_longest, it's not stringly-typed, and it's user-extensible. Something along the lines of zip(foo, bar, baz, and_then=lambda consumed_items, iters: ...).
Brandt _______________________________________________ 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/ZBB5L2I45PNLTRW7CCV4FDJO5DB7M5UT/ Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ 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/ZORX3VCKXFLSODJW6NA33B7MLGFA7UTE/ Code of Conduct: http://python.org/psf/codeofconduct/