Sets in Python

Paddy paddy3118 at googlemail.com
Wed Sep 19 18:06:48 EDT 2007


On Sep 19, 9:58 pm, Karthik Gurusamy <kar1... at gmail.com> wrote:
>
> Since we know hashing is used, all that is needed is, a well-defined
> way to construct a hash out of a mutable. "Given a sequence, how to
> get a hash" is the problem. If later the given sequence is different,
> that's not the dict's problem.
>
Oh it is possible to construct a hash from a mutable. What is
difficult is creating the same hash when the mutable mutates. Or
indeed working out what it means when a hash key mutates and you
access the dictionary.
Ignoring this gives the programmer a big problem hence the limitation.

I don't think you have a better solution.

- Paddy.




More information about the Python-list mailing list