Properly repr classes without module names.

This commit is contained in:
Martin v. Löwis 2001-09-18 20:23:28 +00:00
parent 843daa8cad
commit cf95f9cacb

View File

@ -358,7 +358,7 @@ class_repr(PyClassObject *op)
else
name = PyString_AsString(op->cl_name);
if (mod == NULL || !PyString_Check(mod))
return PyString_FromFormat("<class ?.s at %p>", name, op);
return PyString_FromFormat("<class ?.%s at %p>", name, op);
else
return PyString_FromFormat("<class %s.%s at %p>",
PyString_AsString(mod),