[Python-ideas] Re: Enhancing iterator objects with map, filter, reduce methods

2021-11-27 Thread Abdulla Al Kathiri
Forget about pattern matching in the previous email. The ? should always refer to the whole passed object. You can further manipulate the passed/returned object. Consider the following [1.32, 1.1, 1.4] -> map(round, ?) -> map(operator.mul, ?, (? -> list -> len) * [2]) -> tuple [1.32, 1.1, 1

[Python-ideas] Re: Enhancing iterator objects with map, filter, reduce methods

2021-11-27 Thread Stephen J. Turnbull
Raimi bin Karim writes: > 📌Proposed implementation > Earlier in the thread, Chris proposed a custom class for this kind > of pipeline. > But what if we exposed this as a Python module in the standard library, > parking it under the group of functional programming modules? The thing is, the

[Python-ideas] Re: Enhancing iterator objects with map, filter, reduce methods

2021-11-27 Thread Chris Angelico
On Sat, Nov 27, 2021 at 10:52 PM Stephen J. Turnbull wrote: > > Raimi bin Karim writes: > > > 📌Proposed implementation > > Earlier in the thread, Chris proposed a custom class for this kind > > of pipeline. > > But what if we exposed this as a Python module in the standard library, > > parkin