[Python-Dev] Re: A small proposed change to dictionaries' "get"
method
M.-A. Lemburg
mal@lemburg.com
Thu, 03 Aug 2000 16:49:01 +0200
"Barry A. Warsaw" wrote:
>
> >>>>> "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? :)
I find these .go_home().get_some_cheese().and_eat()...
constructions rather obscure.
--
Marc-Andre Lemburg
______________________________________________________________________
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/