From 9f9dadd4eb634f3f332426663b9cb215f77c7012 Mon Sep 17 00:00:00 2001 From: Griatch Date: Thu, 26 Apr 2012 19:31:03 +0200 Subject: [PATCH] Minor tweak to how cmdsets are matched with the "in" operator. --- src/commands/cmdset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/cmdset.py b/src/commands/cmdset.py index 5bd0906eca..614315d93d 100644 --- a/src/commands/cmdset.py +++ b/src/commands/cmdset.py @@ -222,7 +222,7 @@ class CmdSet(object): Returns True if this cmdset contains the given command (as defined by command name and aliases). This allows for things like 'if cmd in cmdset' """ - return any(cmd == othercmd for cmd in self.commands) + return othercmd in self.commands def __add__(self, cmdset_b): """