On 10/09/2013 10:28am, Antoine Pitrou wrote: > Therefore I propose adding the general pattern. Simple example: > > >>> d = transformdict(str.lower) > >>> d['Foo'] = 5 > >>> d['foo'] > 5 > >>> d['FOO'] > 5 > >>> list(d) > ['Foo'] I guess another example is creating an "identity dict" (see http://code.activestate.com/lists/python-ideas/7161/) by doing d = transformdict(id) -- Richard
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4