[Python-Dev] re: Using lists as sets

Jean-Claude Wippler jcw@equi4.com
Mon, 20 Mar 2000 18:56:44 +0100


>    A map is:                K1,K2,...KN:R1,R2,...,RM

Yes, my list was inconsistent.

> Is K1..KN one key, made up of N sub keys, or do you mean the
> whole set of keys, where each one is mapped somehow.
> Ok, N and M seem to be individual for each object, right?
> Isn't it then better to think different of these objects, saying
> they can produce some key object and some value object of any
> shape, and a position, where each of these can be missing?

Depends on your perspective.  In the relational world, the (K1,...,KN)
attributes identify the object, but they are not themselves considered
an object.  In OO-land, (K1,...,KN) is an object, and a map takes such
as an object as input and delivers (R1,...,RM) as result.

This tension shows the boundary of both relational and OO models, IMO.
I wish it'd be possible to unify them, but I haven't figured it out.

-jcw, concept maverick / fool on the hill - pick one :)