summaryrefslogtreecommitdiff
path: root/django/utils/datastructures.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils/datastructures.py')
-rw-r--r--django/utils/datastructures.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py
index bc8fb07ef5..3d7c4275bb 100644
--- a/django/utils/datastructures.py
+++ b/django/utils/datastructures.py
@@ -42,7 +42,8 @@ class MergeDict:
class SortedDict(dict):
"A dictionary that keeps its keys in the order in which they're inserted."
- def __init__(self, data={}):
+ def __init__(self, data=None):
+ if data is None: data = {}
dict.__init__(self, data)
self.keyOrder = data.keys()
@@ -123,8 +124,9 @@ class MultiValueDict(dict):
def __copy__(self):
return self.__class__(dict.items(self))
- def __deepcopy__(self, memo={}):
+ def __deepcopy__(self, memo=None):
import copy
+ if memo is None: memo = {}
result = self.__class__()
memo[id(self)] = result
for key, value in dict.items(self):