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/2006-February/061235.html below:

[Python-Dev] Proposal: defaultdict

[Python-Dev] Proposal: defaultdict [Python-Dev] Proposal: defaultdictNick Coghlan ncoghlan at gmail.com
Fri Feb 17 16:28:55 CET 2006
Fredrik Lundh wrote:
> Nick Coghlan wrote:
> 
>> Using Guido's original example:
>>
>>   d.get(key, [], True).append(value)
> 
> hmm.  are you sure you didn't just reinvent setdefault ?

I'm reasonably sure I copied it on purpose, only with a name that isn't 100% 
misleading as to what it does ;)

I think collections.defaultdict is a better approach, though.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
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