On 10/09/2013 10:28am, Antoine Pitrou wrote:
I guess another example is creating an "identity dict" (see http://code.activestate.com/lists/python-ideas/7161/) by doingTherefore I propose adding the general pattern. Simple example:>>> d = transformdict(str.lower) >>> d['Foo'] = 5 >>> d['foo'] 5 >>> d['FOO'] 5 >>> list(d) ['Foo']
d = transformdict(id) -- Richard _______________________________________________ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com