On 4/13/2012 22:42, Evan Driscoll wrote: > Though I might as well ask another question... if I have a dict with > values which are lists, what's a good way to say "append x to the list > at key k, creating a list if it's not there"? dict.setdefault seems > potentially promising but the docs are crappy and don't say how it works. Ha ha, sorry I can't read right now apparently. dict.setdefault does exactly what I wanted.
(The name just prompted another interpretation in my mind which doesn't work and I got tunnel vision. I'll stop spamming now, and we return to your regularly scheduled broadcast.) Evan
signature.asc
Description: OpenPGP digital signature
-- http://mail.python.org/mailman/listinfo/python-list