Pre-PEP: Dictionary accumulator methods

Aahz aahz at
Sun Mar 20 22:05:22 CET 2005

In article <1111294347.682560.242840 at>,
Michele Simionato <michele.simionato at> wrote:
>I am surprised nobody suggested we put those two methods into a
>separate module (say dictutils or even UserDict) as functions:
>from dictutils import tally, listappend
>tally(mydict, key)
>listappend(mydict, key, value)

That seems like a reasonable compromise.
Aahz (aahz at           <*>

"The joy of coding Python should be in seeing short, concise, readable
classes that express a lot of action in a small amount of clear code -- 
not in reams of trivial code that bores the reader to death."  --GvR

More information about the Python-list mailing list