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

[Python-Dev] Proposal: defaultdict

[Python-Dev] Proposal: defaultdict [Python-Dev] Proposal: defaultdictBengt Richter bokr at oz.net
Fri Feb 17 19:37:08 CET 2006
On Fri, 17 Feb 2006 08:09:23 +0100, =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?= <martin at v.loewis.de> wrote:

>Guido van Rossum wrote:
>> Feedback?
>
>I would like this to be part of the standard dictionary type,
>rather than being a subtype.
>
>d.setdefault([]) (one argument) should install a default value,
>and d.cleardefault() should remove that setting; d.default
>should be read-only. Alternatively, d.default could be assignable
>and del-able.
I like the latter, but d.default_factory = callable # or None
>
>Also, I think has_key/in should return True if there is a default.
That seems iffy. ISTM potential should not define actual status.

Regards,
Bengt Richter

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