[issue17338] Add length_hint parameter to list, dict, set constructors to allow efficient presizing

Stefan Behnel report at bugs.python.org
Wed Mar 6 06:51:12 CET 2013


Stefan Behnel added the comment:

I agree with basically all counter-arguments that were brought up so far. While I would eventually like to use the available length hints in the special case of Cython's list comprehensions, I'm far from seeing a general applicability for this. The use cases are fairly limited, the (missing) guarantees are easy to misunderstand by users and alternatives exist for most use cases. Python code shouldn't be bothered with memory management.

----------
nosy: +scoder

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17338>
_______________________________________


More information about the Python-bugs-list mailing list