This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.araujo
Recipients eric.araujo, eric.smith, holdenweb, lukasz.langa, michael.foord
Date 2010-11-25.17:55:14
SpamBayes Score 0.0010037252
Marked as misclassified No
Message-id <1290707721.7.0.928422262791.issue10533@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-11-25 17:55:21eric.araujosetrecipients: + eric.araujo, holdenweb, eric.smith, michael.foord, lukasz.langa
2010-11-25 17:55:21eric.araujosetmessageid: <1290707721.7.0.928422262791.issue10533@psf.upfronthosting.co.za>
2010-11-25 17:55:14eric.araujolinkissue10533 messages
2010-11-25 17:55:14eric.araujocreate