A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-January/041904.html below:

[Python-Dev] collections module

[Python-Dev] collections module [Python-Dev] collections moduleMark Russell marktrussell at btopenworld.com
Sat Jan 10 14:44:48 EST 2004
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

More information about the Python-Dev mailing list

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