On 2007-04-25, Steve Holden <[EMAIL PROTECTED]> wrote: > Neil Cerutti wrote: >> That would be documented as undefined behavior, and users >> exhorted not to do such things. >> >> Python's dictionaries are a proven winner--I'm definitely not an >> advocate for changing them. But the general requirement for a >> mapping container *isn't* that keys be immutable, but that you >> either don't mutate keys, or don't do so without also reording >> (rehashing?) the mapping. >> > And which API do you use to "reord(er?) (rehash) the mapping"?
A pretty complex an unnecessary one, I'd guess. ;) Since you would most likely need to remove the changed key from the mapping, and then reinsert the new one, it's just as well to leave the whole process entirely up to the user. Which is how Python currently works. ;) -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list