A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2000-August/007985.html below:

A small proposed change to dictionaries' "get" method

[Python-Dev] Re: A small proposed change to dictionaries' "get" method [Python-Dev] Re: A small proposed change to dictionaries' "get" methodBarry A. Warsaw bwarsaw@beopen.com
Sun, 6 Aug 2000 22:25:54 -0400 (EDT)
>>>>> "GE" == Greg Ewing <greg@cosc.canterbury.ac.nz> writes:

    >> dict.default('hello', []).append('hello')

    GE> Is this new method going to apply to dictionaries only,
    GE> or is it to be considered part of the standard mapping
    GE> interface?

I think we've settled on setdefault(), which is more descriptive, even
if it's a little longer.  I have posted SF patch #101102 which adds
setdefault() to both the dictionary object and UserDict (along with
the requisite test suite and doco changes).

-Barry



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