diff options
| author | Joseph Kocherhans <joseph@jkocherhans.com> | 2006-06-06 01:21:49 +0000 |
|---|---|---|
| committer | Joseph Kocherhans <joseph@jkocherhans.com> | 2006-06-06 01:21:49 +0000 |
| commit | e976ed1f7910fad03704f88853c5c5b36cbab134 (patch) | |
| tree | c4c8d32d4298f64ad9ce8e7813084c2f45a9dc40 /django/utils/datastructures.py | |
| parent | 0c341d780ebcde0e81c81eda07e2db3aaa92549b (diff) | |
multi-auth: Merged to [3085]
git-svn-id: http://code.djangoproject.com/svn/django/branches/multi-auth@3086 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/datastructures.py')
| -rw-r--r-- | django/utils/datastructures.py | 6 |
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): |
