boolean true and false values.

Tim Rowe digitig at cix.co.uk
Tue Jun 27 16:01:00 EDT 2000


In article <3957FA7F.7C982483 at cosc.canterbury.ac.nz>, 
greg at cosc.canterbury.ac.nz (Greg Ewing) wrote:

> Tim Rowe wrote:
> > 
> > > >what would you delimit it with? :-)
> > >
> > > {x,y,z} ?
> > 
> > That's going to get me confused...
> 
> Maybe that could be syntactic sugar for a dictionary which
> maps the keys x, y and z to some default value, e.g. 1.
> Then add some operators for doing set operations on
> dictionaries of that form, and hey presto -- a set type
> without adding a new type!

True, albeit a rather inefficient one in terms of space. I don't see 
what's wrong with a set class and doing 's = set(x, y, z)'.



More information about the Python-list mailing list