Groups
Sign in
Groups
counterclockwise-users
Conversations
About
Send feedback
Help
Bug in clojure.pprint wrt printing vars?
5 views
Skip to first unread message
Laurent PETIT
unread,
Jul 23, 2015, 9:54:08 AM
7/23/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to clojuredev-users
Hello,
Is the following behavior for pprint correct, when compared to raw call to print-method or to print?
;; Clojure 1.6.0
=> (use 'clojure.pprint)
nil
=> (def foo {})
#'user/foo
=> (print #'foo)
#'user/foo
nil
=> (pprint #'foo)
#<Var@14a19ffa: {}>
nil
=> (let [s (java.io.StringWriter.)]
(print-method #'foo s)
(str s))
"#'user/foo"
I would have expected pprint to be at least as human-readable than print?
The problem is showing up in REPL which replace call to print with call to pprint.
--
Laurent Petit
Reply all
Reply to author
Forward
0 new messages