Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

In `MergeDict` class, changed variable names to not clash with `dict`…

… builtin.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6711 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8df3d2b467ec19b146ec3702a63fed3f4d088bee 1 parent dab8503
Gary Wilson Jr. gdub authored
Showing with 10 additions and 10 deletions.
  1. +10 −10 django/utils/datastructures.py
20 django/utils/datastructures.py
View
@@ -7,9 +7,9 @@ def __init__(self, *dicts):
self.dicts = dicts
def __getitem__(self, key):
- for dict in self.dicts:
+ for dict_ in self.dicts:
try:
- return dict[key]
+ return dict_[key]
except KeyError:
pass
raise KeyError
@@ -24,22 +24,22 @@ def get(self, key, default=None):
return default
def getlist(self, key):
- for dict in self.dicts:
+ for dict_ in self.dicts:
try:
- return dict.getlist(key)
+ return dict_.getlist(key)
except KeyError:
pass
raise KeyError
def items(self):
item_list = []
- for dict in self.dicts:
- item_list.extend(dict.items())
+ for dict_ in self.dicts:
+ item_list.extend(dict_.items())
return item_list
def has_key(self, key):
- for dict in self.dicts:
- if key in dict:
+ for dict_ in self.dicts:
+ if key in dict_:
return True
return False
@@ -114,8 +114,8 @@ def itervalues(self):
for key in self.keyOrder:
yield dict.__getitem__(self, key)
- def update(self, dict):
- for k, v in dict.items():
+ def update(self, dict_):
+ for k, v in dict_.items():
self.__setitem__(k, v)
def setdefault(self, key, default):
Please sign in to comment.
Something went wrong with that request. Please try again.