Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Readable hash tables
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Erik Naggum  
View profile  
 More options Jun 14 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.no>
Date: 2000/06/14
Subject: Re: Readable hash tables
* Ivar Rummelhoff <iva...@math.uio.no>
| I'm so sorry.
|
|  (let ((dispatch
|         (let ((tab (copy-pprint-dispatch nil)))
|           (set-pprint-dispatch 'hash-table #'hash-print 0 tab)
|           tab)))
|    (defun mi-write (obj &rest args)
|      (let ((*print-pprint-dispatch* dispatch))
|        (setf (getf args :pretty) t)
|        (apply #'write obj args))))
|  
| should replace the erroneous function by the same name in my previous
| posting.

  Although not strictly erroneous, you don't really know whether the
  argument list is modifiable and safe to modify.  I highly recommend

(apply #'write obj :pretty t args)

  as only the first occurrence of a keyword argument is used and any
  redundancy is just ignored.

| Alas, this the new version insists on printing pretty...

  Well, you _could_ empty the pprint-dispatch if *print-pretty* is nil
  upon entry to the function.  An empty *pprint-dispatch* is returned
  from excl::make-pprint-dispatch without arguments in Allegro CL.

#:Erik
--
  If this is not what you expected, please alter your expectations.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.