[Python-Dev] collections module (original) (raw)
Mark Russell marktrussell at btopenworld.com
Sat Jan 10 14:44:48 EST 2004
- Previous message: [Python-Dev] collections module
- Next message: [Python-Dev] collections module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 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
- Previous message: [Python-Dev] collections module
- Next message: [Python-Dev] collections module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]