mirror of
https://github.com/django/django.git
synced 2025-10-30 17:16:10 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user