[Python-ideas] In consistent arguments: map v filter [was: Enhancing iterators ...]

2021-11-23 Thread Stephen J. Turnbull
Chris Angelico writes: > It's not too hard to create your own dataflow class if you want one. > It can start with any arbitrary iterable, and then have your map and > filter methods just the same. One thing I noticed when implementing this class (yours is better, so I'm not posting mine :-) is

[Python-ideas] Re: In consistent arguments: map v filter [was: Enhancing iterators ...]

2021-11-23 Thread Chris Angelico
On Tue, Nov 23, 2021 at 7:47 PM Stephen J. Turnbull wrote: > > Chris Angelico writes: > > > It's not too hard to create your own dataflow class if you want one. > > It can start with any arbitrary iterable, and then have your map and > > filter methods just the same. > > One thing I noticed whe

[Python-ideas] 'strict' for other itertools [was: Inconsistent arguments...]

2021-11-23 Thread Stephen J. Turnbull
Chris Angelico writes: > On Tue, Nov 23, 2021 at 7:47 PM Stephen J. Turnbull > 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 zi

[Python-ideas] Re: 'strict' for other itertools [was: Inconsistent arguments...]

2021-11-23 Thread Chris Angelico
On Wed, Nov 24, 2021 at 12:39 AM Stephen J. Turnbull wrote: > > Chris Angelico writes: > > On Tue, Nov 23, 2021 at 7:47 PM Stephen J. Turnbull > > wrote: > > > > There's also implementing zip's strict argument, eg, > > > > > > def zippymap(func, *iterables, strict=False): > > > return m