mirror of https://github.com/python/cpython
Fixed a bug in the representation of self-referential tuples.
This commit is contained in:
parent
73eada3287
commit
3fe8216f33
|
@ -201,7 +201,7 @@ tuplerepr(PyTupleObject *v)
|
||||||
possible within a type. */
|
possible within a type. */
|
||||||
i = Py_ReprEnter((PyObject *)v);
|
i = Py_ReprEnter((PyObject *)v);
|
||||||
if (i != 0) {
|
if (i != 0) {
|
||||||
return i > 0 ? PyString_FromString("(...)") : NULL;
|
return i > 0 ? PyUnicode_FromString("(...)") : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
pieces = PyTuple_New(n);
|
pieces = PyTuple_New(n);
|
||||||
|
|
Loading…
Reference in New Issue