Antoine Pitrou <pit...@free.fr> added the comment: Le mercredi 23 mai 2012 à 16:22 +0000, stw a écrit : > So the tuple is linked-in to the garbage collection list before its > contents are constructed?
It is. It typically happens when you do (in C code): PyObject *my_tuple = PyTuple_New(2); /* compute some_object ... */ PyTuple_SET_ITEM(my_tuple, 0, some_object); /* compute some_other_object ... */ PyTuple_SET_ITEM(my_tuple, 1, some_other_object); > Could tuples not be untracked at creation time then, or do not enough > survive to gc to make this worthwhile? The latter. Also, tuples are created at a high rate in the interpreter, so it can actually decrease performance. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14775> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com