summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/datastructures.py2
-rw-r--r--django/utils/functional.py2
-rw-r--r--django/utils/translation/trans_real.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py
index cca30b462d..60bc0051a2 100644
--- a/django/utils/datastructures.py
+++ b/django/utils/datastructures.py
@@ -42,7 +42,7 @@ class MergeDict(object):
def has_key(self, key):
for dict in self.dicts:
- if dict.has_key(key):
+ if key in dict:
return True
return False
diff --git a/django/utils/functional.py b/django/utils/functional.py
index e3c0a3c76b..0c31c1f375 100644
--- a/django/utils/functional.py
+++ b/django/utils/functional.py
@@ -42,7 +42,7 @@ def lazy(func, *resultclasses):
res = self.__func(*self.__args, **self.__kw)
return self.__dispatch[type(res)][funcname](res, *args, **kw)
- if not self.__dispatch.has_key(klass):
+ if klass not in self.__dispatch:
self.__dispatch[klass] = {}
self.__dispatch[klass][funcname] = func
return __wrapper__
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py
index 0c8dcd540f..293b4ef9cd 100644
--- a/django/utils/translation/trans_real.py
+++ b/django/utils/translation/trans_real.py
@@ -199,7 +199,7 @@ def deactivate():
will resolve against the default translation object, again.
"""
global _active
- if _active.has_key(currentThread()):
+ if currentThread() in _active:
del _active[currentThread()]
def get_language():