1
0
mirror of https://github.com/django/django.git synced 2025-10-26 23:26:08 +00:00

[py3] Replace filter/lambda by list comprehensions

This is more idiomatic and avoids returning a list on Python 2 and
an iterator on Python 3.
This commit is contained in:
Aymeric Augustin
2012-08-14 14:22:08 +02:00
parent 5b27e6f64b
commit 0c198b85a3
5 changed files with 6 additions and 5 deletions

View File

@@ -75,7 +75,7 @@ class Command(NoArgsCommand):
(opts.auto_created and converter(opts.auto_created._meta.db_table) in tables))
manifest = SortedDict(
(app_name, filter(model_installed, model_list))
(app_name, list(filter(model_installed, model_list)))
for app_name, model_list in all_models
)