[prev in list] [next in list] [prev in thread] [next in thread]
List: python-ideas
Subject: [Python-ideas] 'strict' for other itertools [was: Inconsistent arguments...]
From: "Stephen J. Turnbull" <stephenjturnbull () gmail ! com>
Date: 2021-11-23 13:39:25
Message-ID: m2zgpv6lf6.fsf () sk ! tsukuba ! ac ! jp
[Download RAW message or body]
Chris Angelico writes:
> On Tue, Nov 23, 2021 at 7:47 PM Stephen J. Turnbull
> <stephenjturnbull@gmail.com> wrote:
> > There's also implementing zip's strict argument, eg,
> >
> > def zippymap(func, *iterables, strict=False):
> > return map(lambda x: func(*x), zip(*iterables, strict))
> >
> > and corresponding zippymappers for any other mappers (including
> > filter). This seems like it might be useful extension to the
> > functions in the stdlib for the same reason that it's useful for zip
> > itself. Even though it's so easy to implement in terms of zip, it
> > would be more discoverable as a documented argument to the functions.
> >
> > Comments?
>
> Given that I don't actually want a pipeline like this, I'm not the
> best one to ask, but I would strongly favour ultra-simple APIs.
Ah, but I changed the subject here. Sorry about not making that
clear. This isn't a method on a dataflow, it would be a a change to
map itself.
Steve
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-leave@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/ZIRHIC4J6EDGASBS7XB5Q2NHCNV326C4/
Code of Conduct: http://python.org/psf/codeofconduct/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic