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/061519.html below:

[Python-Dev] Proposal: defaultdict

[Python-Dev] Proposal: defaultdict [Python-Dev] Proposal: defaultdictAlex Martelli aleaxit at gmail.com
Mon Feb 20 22:24:24 CET 2006
On Feb 20, 2006, at 12:38 PM, Aahz wrote:
    ...
>> Can you say, for the record (since nobody else seems to care), if
>> d.getorset(key, func) would work in your use cases?
>
> Because I haven't been reading this thread all that closely, you'll  
> have
> to remind me what this means.

Roughly the same (save for method/function difference) as:

def getorset(d, key, func):
   if key not in d: d[key] = func()
   return d[key]


Alex

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