From 18f3ae4219bee1a41397364038f63d8e14e1ced5 Mon Sep 17 00:00:00 2001 From: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com> Date: Sat, 11 Nov 2023 20:54:41 +0100 Subject: [PATCH] Avoid creating an unnecessary list (use an iterator instead) --- game/scripts/utility/common_functions.rpy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/scripts/utility/common_functions.rpy b/game/scripts/utility/common_functions.rpy index 12938c08..72d27df5 100644 --- a/game/scripts/utility/common_functions.rpy +++ b/game/scripts/utility/common_functions.rpy @@ -122,7 +122,7 @@ init python early: if isinstance(obj, _list): return [make_revertable(x) for x in obj] elif isinstance(obj, _dict): - return dict([(make_revertable(k), make_revertable(v)) for (k,v) in obj.items()]) + return dict((make_revertable(k), make_revertable(v)) for (k,v) in obj.items()) else: return obj