diff options
| author | Michael Lelyakin <mlelyakin@mirantis.com> | 2016-12-14 14:36:34 -0800 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-12-14 17:36:34 -0500 |
| commit | fb1349ce8cfd207ec5bbdb617dad75a73caee33b (patch) | |
| tree | 253f9b0bc8316a1b57812cf3ca26825a8ef457c4 /django/utils/lorem_ipsum.py | |
| parent | e5d3f98abcdc20d64d99609bd0aa82331835b439 (diff) | |
Used ternary if/else in utils.lorem_ipsum.words().
Diffstat (limited to 'django/utils/lorem_ipsum.py')
| -rw-r--r-- | django/utils/lorem_ipsum.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/django/utils/lorem_ipsum.py b/django/utils/lorem_ipsum.py index a9459f4395..03426c152b 100644 --- a/django/utils/lorem_ipsum.py +++ b/django/utils/lorem_ipsum.py @@ -103,10 +103,7 @@ def words(count, common=True): If `common` is True, then the first 19 words will be the standard 'lorem ipsum' words. Otherwise, all words will be selected randomly. """ - if common: - word_list = list(COMMON_WORDS) - else: - word_list = [] + word_list = list(COMMON_WORDS) if common else [] c = len(word_list) if count > c: count -= c |
