STINNER Victor <vstin...@python.org> added the comment:

> That's a lot slower unfortunately

Ah sorry, I forgot PyTuple_Pack(3, item1, item2, item3) which should be very 
efficient. This function is also safe: only track the tuple when it is fully 
initialized.

> This problem also is not unique to tuples, although is mainly prominent in 
> them.

PyList_New() is also affected. Do you think about other types?

PyDict_New() and PySet_New() create empty containers and so are ok.

----------

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

Reply via email to