Fixed #2620: made MergeDict.get() correctly work with the two-argument form of get(). Thanks for the patch, SmileyChris.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4576 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2007-02-25 16:37:31 +00:00
parent 0a2155e5b3
commit 5b66c74b32
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ class MergeDict(object):
def __contains__(self, key): def __contains__(self, key):
return self.has_key(key) return self.has_key(key)
def get(self, key, default): def get(self, key, default=None):
try: try:
return self[key] return self[key]
except KeyError: except KeyError: