On 02/01/2013 8:37pm, Mike Meyer wrote: > How about a set_key method? It takes a single callable as an argument. > You'd get your behavior with dict.set_key(id). If called when the dict > is non-empty, it should throw an exception. Wouldn't you need to specify a hash function at the same time? -- Richard