Remove several uses of the deprecated dict.has_key in favor of the in operator. This is faster, has less code, and is in every single way better.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14392 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Alex Gaynor 2010-10-29 04:24:53 +00:00
parent cb17f7ca22
commit c38a174f7c
4 changed files with 16 additions and 16 deletions

View file

@ -864,9 +864,9 @@ class ValuesQuerySet(QuerySet):
# we inspect the full extra_select list since we might
# be adding back an extra select item that we hadn't
# had selected previously.
if self.query.extra.has_key(f):
if f in self.query.extra:
self.extra_names.append(f)
elif self.query.aggregate_select.has_key(f):
elif f in self.query.aggregate_select:
self.aggregate_names.append(f)
else:
self.field_names.append(f)