mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Properly repr classes without module names.
This commit is contained in:
parent
843daa8cad
commit
cf95f9cacb
1 changed files with 1 additions and 1 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue