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/007861.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
Thu, 3 Aug 2000 10:41:10 -0400 (EDT)
>>>>> "M" == M  <mal@lemburg.com> writes:

    M> The following one-liner already does what you want:

    M> 	d[word] = d.get(word, []).append('world')

    M> ... and it's in no way more readable than your proposed
    M> .put() line ;-)

Does that mean it's less readable?  :)

-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