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:
parent
0a2155e5b3
commit
5b66c74b32
|
@ -17,7 +17,7 @@ class MergeDict(object):
|
|||
def __contains__(self, key):
|
||||
return self.has_key(key)
|
||||
|
||||
def get(self, key, default):
|
||||
def get(self, key, default=None):
|
||||
try:
|
||||
return self[key]
|
||||
except KeyError:
|
||||
|
|
Loading…
Reference in New Issue