Author: gwilson
Date: 2007-11-25 12:07:57 -0600 (Sun, 25 Nov 2007)
New Revision: 6711
Modified:
django/trunk/django/utils/datastructures.py
Log:
In `MergeDict` class, changed variable names to not clash with `dict` builtin.
Modified: django/trunk/django/utils/datastructures.py
===================================================================
--- django/trunk/django/utils/datastructures.py 2007-11-23 10:51:17 UTC (rev
6710)
+++ django/trunk/django/utils/datastructures.py 2007-11-25 18:07:57 UTC (rev
6711)
@@ -7,9 +7,9 @@
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 @@
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 @@
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):
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---