[Pkg-mpd-commits] [python-mpd] 52/262: mpd.py: don't use has_key()
Simon McVittie
smcv at debian.org
Sun May 22 18:16:24 UTC 2016
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch upstream
in repository python-mpd.
commit c7cae3cb4d94dbd675ef5256c02d0ee3b250c468
Author: J. Alexander Treuman <jat at spatialrift.net>
Date: Fri Sep 11 19:22:11 2009 -0400
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:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mpd/python-mpd.git
More information about the Pkg-mpd-commits
mailing list