Pablo Galindo Salgado <pablog...@gmail.com> added the comment:

@serhiy.storchaka @rhettinger @vstinner Should we better make the 
pre-allocation if the length of the iterable is known (so we call 
PyObject_Length and not PyObject_LengthHint)? This will keep the logic simpler 
(so not shrinking if PyObject_LengthHint gives more than the real length) and 
it will not be as expensive as calling PyObject_LengthHint.

----------

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

Reply via email to