On Mon, Nov 26, 2018, 17:38 Steven D'Aprano <st...@pearwood.info wrote:

> On Mon, Nov 26, 2018 at 02:06:52PM -0800, Michael Selik wrote:
> > If you know the input is sizeable, why not check its length instead of
> the
> > map's?
>
> The consumer of map may not be the producer of map.
>
> You might know that alist supports len(), but by the time I see it, I
> only see map(f, alist), not alist itself.
>

Then you have no way of knowing whether it is safe to use "len" or not.

>
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to