[CLJ-1445] pprint prints some metadata when *print-meta* bound to true, but not all Created: 13/Jun/14 Updated: 13/Jun/14
|Affects Version/s:||Release 1.6|
Short example illustrating the behavior:
I have not dug into the details yet, but it appears that this may be because pprint uses pr to show symbols, but not to show collections. Thus pprint shows metadata on symbols, but not collections.
It would be nice if pprint could instead show all metadata, as pr does, when print-meta is bound to true.
|Comment by Andy Fingerhut [ 13/Jun/14 11:30 AM ]|
Attached file clj-1445-workaround-v1.clj is a function that pprints with more metadata than clojure.pprint does. As noted in the comments, it may not show metadata on other metadata. Please update with an enhanced version if you create one.
|Comment by Andy Fingerhut [ 13/Jun/14 12:26 PM ]|
Attached file clj-1445-workaround-v2.clj supersedes the earlier one, which I will delete.
The included function pprint-meta appears to be a correct way to pprint values with all metadata, even if the metadata maps themselves have metadata on them.