Permalink
Browse files

Simplified two unnecessary list comprehensions in core/meta/__init__.…

…py. Thanks, Ned Batchelder

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2531 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 426e722 commit 33c4e307f24e4af52430550fd9e444d9add13201 @adrianholovaty adrianholovaty committed Mar 19, 2006
Showing with 2 additions and 3 deletions.
  1. +2 −3 django/core/meta/__init__.py
@@ -205,14 +205,13 @@ def get_list(self, parent_instance=None):
change = count - len(list)
if change > 0:
- return list + [None for _ in range(change)]
+ return list + [None] * len(change)
if change < 0:
return list[:change]
else: # Just right
return list
else:
- return [None for _ in range(self.field.rel.num_in_admin)]
-
+ return [None] * len(self.field.rel.num_in_admin)
def editable_fields(self):
"Get the fields in this class that should be edited inline."

0 comments on commit 33c4e30

Please sign in to comment.