[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hash tables

From: Jim Blandy
Subject: Re: hash tables
Date: 08 Jul 2001 17:08:07 -0500

address@hidden (Thomas Bushnell, BSG) writes:
> Python does not have improper lists.  So I'm going to use pairs like
> ('hash . the-table-itself)
> to represent Python objects that don't have easy Scheme counterparts.
> That works as long as the cdr of these pairs is never itself a pair;
> then it's easy and quick to distinguish these from Python lists.

Under this representation, to test whether a Guile object represents a
Python list, you have to say:

  (or (null? OBJ)
      (and (pair? OBJ)
           (or (null? (cdr OBJ))
               (pair? OBJ))))

Is that right?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]