From: cgw at fnal.gov (Charles G Waldman)
Date: Fri, 23 Apr 1999 02:47:43 GMT
Subject: try vs. has_key()
Message-ID: <199904230247.VAA10380@buffalo.fnal.gov>
X-UID: 1656                                                  

Personally I really like the new-ish "get" method of dictionaries, which lets you write

 dict[key] = dict.get(key,[]) + [foo]

I don't know about performance implications but it's a nice terse construct.





