Aka: Remove first elements of the 'args' list in a single pass.

This commit is contained in:
Valentin Lorentz 2017-04-17 10:31:43 +02:00
parent d73de5e512
commit 5452d4194a

View File

@ -468,9 +468,7 @@ class Aka(callbacks.Plugin):
assert not biggestAt assert not biggestAt
# Gotta remove the things that have already been subbed in. # Gotta remove the things that have already been subbed in.
i = biggestDollar i = biggestDollar
while i: args[:] = args[i:]
args.pop(0)
i -= 1
def everythingReplace(tokens): def everythingReplace(tokens):
for (i, token) in enumerate(tokens): for (i, token) in enumerate(tokens):
if isinstance(token, list): if isinstance(token, list):