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

[Python-Dev] Proposal: defaultdict

[Python-Dev] Proposal: defaultdict [Python-Dev] Proposal: defaultdictNick Coghlan ncoghlan at gmail.com
Sat Feb 18 08:23:20 CET 2006
Guido van Rossum wrote:
> I'd much rather be able to write "if key in d" and get the result I want...

Somewhere else in this byzantine thread, I realised that what was really 
bothering me was the conditional semantics that dict ended up with (i.e., it's 
behaviour changed significantly if the default factory was set).

If we go back to your idea of collection.defaultdict (or Alex's name 
collection.autodict), then the change in semantics bothers me a lot less, and 
I'd be all in favour of the more usual variant (where "key in d" implies "key 
in d.keys()".

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