From 5452d4194adfc555e36416fb27d5e1a314ee9da5 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Mon, 17 Apr 2017 10:31:43 +0200 Subject: [PATCH] Aka: Remove first elements of the 'args' list in a single pass. --- plugins/Aka/plugin.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/Aka/plugin.py b/plugins/Aka/plugin.py index 45f135632..0d02dded1 100644 --- a/plugins/Aka/plugin.py +++ b/plugins/Aka/plugin.py @@ -468,9 +468,7 @@ class Aka(callbacks.Plugin): assert not biggestAt # Gotta remove the things that have already been subbed in. i = biggestDollar - while i: - args.pop(0) - i -= 1 + args[:] = args[i:] def everythingReplace(tokens): for (i, token) in enumerate(tokens): if isinstance(token, list):