On Sun, Jul 15, 2012 at 1:28 AM, Alexandre Zani
<alexandre.z...@gmail.com> wrote:
> I'm +1 on not having a public API for this. Ultimately the contract
> for a length hint will depend heavily upon what you need it for. Some
> applications would require a length hint to be an "at least" others an
> "at most" and others something else entirely. Given that the contract
> here appears to be >=0, I don't think the length hint is particularly
> useful to the public at large.

Other possible related uses could be to get an approximate number of
results for a query without having to actually go through the whole
query, useful for databases and search engines. But then you *do* want
__len__ as well, so that also doesn't fit with the current PEP.

But maybe that's a completely different usecase, even though it seems
related to me?

//Lennart
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to