From c7cae3cb4d94dbd675ef5256c02d0ee3b250c468 Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Fri, 11 Sep 2009 19:22:11 -0400 Subject: [PATCH] mpd.py: don't use has_key() key in obj is easier to read, and even a little faster. --- mpd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpd.py b/mpd.py index 1704b7b..62df3a1 100644 --- a/mpd.py +++ b/mpd.py @@ -215,7 +215,7 @@ class MPDClient(object): if key in delimiters: yield obj obj = {} - elif obj.has_key(key): + elif key in obj: if not isinstance(obj[key], list): obj[key] = [obj[key], value] else: -- 2.39.5