From 529c3f264d99fff0129cb6afbe4be2eb11d8a501 Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Wed, 11 Jul 2018 18:12:50 +0500 Subject: [PATCH] Simplified BaseContext.__iter__(). --- django/template/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/template/context.py b/django/template/context.py index 8218e86491..8f349a3a96 100644 --- a/django/template/context.py +++ b/django/template/context.py @@ -43,7 +43,7 @@ class BaseContext: return repr(self.dicts) def __iter__(self): - yield from reversed(self.dicts) + return reversed(self.dicts) def push(self, *args, **kwargs): dicts = []