Freezing a mutable (was Re: lambda)

Antoon Pardon apardon at forel.vub.ac.be
Fri Jan 21 03:15:52 EST 2005


Op 2005-01-21, Bengt Richter schreef <bokr at oz.net>:
> On 20 Jan 2005 14:07:57 GMT, Antoon Pardon <apardon at forel.vub.ac.be> wrote:
>
> Would you like a dictionary that acts as you want and takes care of all
> problems internally, and accepts keys and values of any type without wrapping
> or other modification -- or do you want a wrapper that can make any object
> suitable for use as key or value in python's curent definition of dict?
>
> Just DYFR please. You still haven't you know ;-)

My feeling is that I'm hungry and would like to eat and you ask whether
my requirements are a sandwhich or a bowl of soup. :-)

The real requirement IMO is that any attempt to mutate an object wont
result in a mutated key. Both proposals seem to solve that. The second
is at the moment for me the most interesting to discuss, since it is
a new approach to me, and most likely to learn me something new.

-- 
Antoon Pardon



More information about the Python-list mailing list