diff options
Diffstat (limited to 'django/utils/translation/trans_real.py')
-rw-r--r-- | django/utils/translation/trans_real.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py index b528f8e586..98b8d940b3 100644 --- a/django/utils/translation/trans_real.py +++ b/django/utils/translation/trans_real.py @@ -496,7 +496,7 @@ def parse_accept_lang_header(lang_string): return [] priority = priority and float(priority) or 1.0 result.append((lang, priority)) - result.sort(lambda x, y: -cmp(x[1], y[1])) + result.sort(key=lambda k: k[1], reverse=True) return result # get_date_formats and get_partial_date_formats aren't used anymore by Django |