From 01a1d4441ef6e56afe7f0c6d5d6c3c10acd9d351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sat, 4 Apr 2020 00:20:57 +0200 Subject: plugin/display_corrections: prefer generator to list when looping MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- plugins/display_corrections.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/display_corrections.py b/plugins/display_corrections.py index e9e8a2e4..99982ec9 100644 --- a/plugins/display_corrections.py +++ b/plugins/display_corrections.py @@ -43,7 +43,7 @@ class Plugin(BasePlugin): messages = self.api.get_conversation_messages() if not messages: return None - for message in messages[::-1]: + for message in reversed(messages): if message.old_message: if nb == 1: return message -- cgit v1.2.3