print-object: when printing the standard object print its address
Now instead of a default printer #<a foo> we have the identity information #<a foo 0x56123571d240>. That is certainly useful for printing when we have lists of instances of the same class.
This commit is contained in:
parent
3891bcc76b
commit
f532057a83
1 changed files with 1 additions and 1 deletions
|
|
@ -193,7 +193,7 @@ printer and we should rather use MAKE-LOAD-FORM."
|
|||
instance)
|
||||
|
||||
(defmethod print-object ((instance standard-object) stream)
|
||||
(print-unreadable-object (instance stream)
|
||||
(print-unreadable-object (instance stream :identity t)
|
||||
(let ((*package* (find-package "CL")))
|
||||
(format stream "a ~S"
|
||||
(class-name (si:instance-class instance)))))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue