mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Correct object.__repr__ format
This commit is contained in:
@@ -185,7 +185,11 @@ impl PyBaseObject {
|
||||
/// Return repr(self).
|
||||
#[pymethod(magic)]
|
||||
fn repr(zelf: PyObjectRef) -> String {
|
||||
format!("<{} object at {:#x}>", zelf.class().name, zelf.get_id())
|
||||
format!(
|
||||
"<{} object at {:#x}>",
|
||||
zelf.class().tp_name(),
|
||||
zelf.get_id()
|
||||
)
|
||||
}
|
||||
|
||||
#[pyclassmethod(magic)]
|
||||
|
||||
Reference in New Issue
Block a user