[Python-Dev] Re: A small proposed change to dictionaries' "get" method

Barry A. Warsaw bwarsaw at beopen.com
Thu Aug 3 10:41:10 EDT 2000


>>>>> "M" == M  <mal at 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




More information about the Python-list mailing list