Re: [Python-ideas] __len__() for map()

2018-11-30 Thread E. Madison Bray
On Thu, Nov 29, 2018 at 7:16 PM Jonathan Fine wrote: > > On Thu, Nov 29, 2018 at 2:44 PM Steven D'Aprano wrote: > > > You might say that your users are not so advanced, or that they're naive > > enough not to even know they could do that, but that's a pretty unsafe > > assumption as well as being

Re: [Python-ideas] __len__() for map()

2018-11-30 Thread E. Madison Bray
On Thu, Nov 29, 2018 at 9:36 PM Terry Reedy wrote: > >> https://docs.python.org/3/library/functions.html#map says > >> "map(function, iterable, ...) > >> Return an iterator [...]" > >> > >> The wording is intentional. The fact that map is a class and the > >> iterator an instance of the cla

Re: [Python-ideas] __len__() for map()

2018-11-30 Thread Steven D'Aprano
On Fri, Nov 30, 2018 at 10:32:31AM +0100, E. Madison Bray wrote: > I think it goes without saying that > map() is special in a way: It's one of the most basic extensions to > function application and is a fundamental construct in functional > programming and from a category-theortical perspective.

Re: [Python-ideas] __len__() for map()

2018-11-30 Thread Steven D'Aprano
On Thu, Nov 29, 2018 at 08:13:12PM -0500, Paul Svensson wrote: > Excellent proposal, followed by a flood of confused replies, > which I will mostly disregard, since all miss the obvious. When everyone around you is making technical responses which you think are "confused", it is wise to consider