[Python-ideas] Identity dicts and sets

Richard Oudkerk shibturn at gmail.com
Wed Jan 2 22:35:30 CET 2013


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




More information about the Python-ideas mailing list