On Sat, 2004-01-10 at 19:26, Raymond Hettinger wrote: > Instead of a method, it may be better to use a keyword argument in the > constructor: > > d = dict(default = lambda k:[]) Unfortunately that has a meaning already: >>> d = dict(default = lambda k:[]) >>> d {'default': <function <lambda> at 0x40212ed4>} A shame, because it does look nicer (OTOH I use and like the keyword argument dict constructor). I'd love to have the implicit default functionality though. Mark Russell
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