From: J. Alexander Treuman Date: Fri, 11 Sep 2009 23:22:11 +0000 (-0400) Subject: mpd.py: don't use has_key() X-Git-Tag: v0.3.0~31 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=c7cae3cb4d94dbd675ef5256c02d0ee3b250c468;p=python-musicpd.git mpd.py: don't use has_key() key in obj is easier to read, and even a little faster. --- 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: