summaryrefslogtreecommitdiff
path: root/django/templatetags
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2017-07-31 20:02:23 +0500
committerTim Graham <timograham@gmail.com>2017-07-31 11:02:23 -0400
commitaadd3aeb2ba3153e35bd805c80c901f289a6f333 (patch)
tree20d37a25e7ae620c12886dfe5aed981590dfd2dc /django/templatetags
parent0f905e4b4479894f67b12ad976402a9660f0cae4 (diff)
Avoided creating temporary lists for obtaining the first item.
Diffstat (limited to 'django/templatetags')
-rw-r--r--django/templatetags/i18n.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/templatetags/i18n.py b/django/templatetags/i18n.py
index 8627bf4331..517eb61528 100644
--- a/django/templatetags/i18n.py
+++ b/django/templatetags/i18n.py
@@ -500,7 +500,7 @@ def do_block_translate(parser, token):
options[option] = value
if 'count' in options:
- countervar, counter = list(options['count'].items())[0]
+ countervar, counter = next(iter(options['count'].items()))
else:
countervar, counter = None, None
if 'context' in options: