mirror of
https://github.com/django/django.git
synced 2025-09-22 18:22:40 +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:
parent
cb17f7ca22
commit
c38a174f7c
4 changed files with 16 additions and 16 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue