diff -r a507882736b2 Objects/tupleobject.c --- a/Objects/tupleobject.c Wed Jan 25 22:33:43 2017 +0900 +++ b/Objects/tupleobject.c Fri Feb 03 20:25:12 2017 +0900 @@ -300,6 +300,13 @@ tuplerepr(PyTupleObject *v) goto error; } + // tuple under construction may be exposed unintentionally. + if (v->ob_item[i] == NULL) { + if (_PyUnicodeWriter_WriteASCIIString(&writer, "", 6) < 0) { + goto error; + } + } + if (Py_EnterRecursiveCall(" while getting the repr of a tuple")) goto error; s = PyObject_Repr(v->ob_item[i]);