[Python-Dev] Re: A small proposed change to dictionaries' "get" method
M.-A. Lemburg
mal at lemburg.com
Thu Aug 3 10:49:01 EDT 2000
"Barry A. Warsaw" wrote:
>
> >>>>> "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? :)
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/
More information about the Python-list
mailing list