STINNER Victor added the comment:

"I think the argument against using PyObject_LengthHint for the general 
iterable case is that for inputs other than sets or dicts, the assumption is 
that significant deduplication will occur."

Oh... I'm dumb :) Sorry.

Another option for frozenset only: we may adjust the internal size when the 
frozenset is created from an iterator.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21507>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to