On 4/3/06, Ian Bicking <[EMAIL PROTECTED]> wrote: [snip] > Adam gave one possible implementation. Another would be a keyed > dictionary, e.g.,: KeyedDict(key=lambda s: s.lower()). A keyed > dictionary would internally call that function on keys to get the "true" > key, but things like .keys() would return the keys that were passed in.
I'm sorry, I should have been more clear. My "implementation," if you can even call it that, was intended as a counter-example to Talin's suggestion. Talin's concern was addressed long ago with the ability to subclass built in types. Its easy to flavor a dict to act however you want. My point wasn't "look how easy this is, lets add it to the core language" but rather "look how easy the core language makes it for you to do this yourself." IMHO, if you want a flavor of dict, extend it yourself. Case insensitivity has no place in the core language. Cheers - Adam DePrince _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
