I searched this list before I asked and couldn't find anything.

Anyway, I understand from Nick's response that len() is conceived for collections which have a size computable in constant time (I suppose structures that maintain some inner attribute to store their length). I also believe that "length" sounds more like an attribute name than a name for something which really does some computation ("count" sounds more appropriate for that). On the other hand, it doesn't seem to be a general concern not to provide construction which can lead to hidden complexity cost (like "in" used on a list vs a set).

On Fri, Oct 3, 2014 at 7:05 PM, Stefan Behnel <stefan_ml@behnel.de> wrote:
Thomas Chaumeny schrieb am 03.10.2014 um 17:09:
> What do you think ?

You can read the answers in the previous discussion threads on this list
(and on python-list, and IIRC the py3k list, and maybe python-dev, too)
that deal with exactly this proposal.

Stefan


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