Commit 0f1653e9 authored by Amaury Forgeot d'Arc's avatar Amaury Forgeot d'Arc

Correct previous checkin, probably a svn merge issue.

Now the code is similar to the one in trunk/.

The behavior was funny:
   >>> print (), repr(())
   (), ()
   >>> print (), repr(())
   (), (...)
parent aa975432
......@@ -208,6 +208,10 @@ tuplerepr(PyTupleObject *v)
PyObject *s, *temp;
PyObject *pieces, *result = NULL;
n = v->ob_size;
if (n == 0)
return PyString_FromString("()");
/* While not mutable, it is still possible to end up with a cycle in a
tuple through an object that stores itself within a tuple (and thus
infinitely asks for the repr of itself). This should only be
......@@ -217,10 +221,6 @@ tuplerepr(PyTupleObject *v)
return i > 0 ? PyString_FromString("(...)") : NULL;
}
n = v->ob_size;
if (n == 0)
return PyString_FromString("()");
pieces = PyTuple_New(n);
if (pieces == NULL)
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment