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

[Python-Dev] Proposal: defaultdict

[Python-Dev] Proposal: defaultdict [Python-Dev] Proposal: defaultdict"Martin v. Löwis" martin at v.loewis.de
Fri Feb 17 23:00:36 CET 2006
Fuzzyman wrote:
>>Also, I think has_key/in should return True if there is a default.
>>
>>  
>>
> And exactly what use would it then be ?

Code that checks

if d.has_key(k):
  print d[k]

would work correctly. IOW, you could use a dictionary with a default
key just as if it were a normal dictionary - which is a useful
property, IMO.

Regards,
Martin
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