Message122391
Like three-liners? whatsnew/2.5 gives us this one:
class zerodict(dict):
def __missing__(self, key):
return 0
I don’t think it’s too painful to have to use defaultdict with a lambda. We can’t use a keyword argument and I’m -0.5 on changing behavior depending on the type of the first argument. |
|
Date |
User |
Action |
Args |
2010-11-25 17:55:21 | eric.araujo | set | recipients:
+ eric.araujo, holdenweb, eric.smith, michael.foord, lukasz.langa |
2010-11-25 17:55:21 | eric.araujo | set | messageid: <1290707721.7.0.928422262791.issue10533@psf.upfronthosting.co.za> |
2010-11-25 17:55:14 | eric.araujo | link | issue10533 messages |
2010-11-25 17:55:14 | eric.araujo | create | |
|