From 811c4e0b7cb1a3b43cda8dab0b1587983b44c58d Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 22 Aug 2006 15:45:46 +0000 Subject: Remove has_key() references from idlelib. IDLE still doesn't run due to relative import issues. Any volunteers? --- Lib/idlelib/rpc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Lib/idlelib/rpc.py') diff --git a/Lib/idlelib/rpc.py b/Lib/idlelib/rpc.py index 3bac6a30b3..e3a42d943a 100644 --- a/Lib/idlelib/rpc.py +++ b/Lib/idlelib/rpc.py @@ -169,7 +169,7 @@ class SocketIO(object): how, (oid, methodname, args, kwargs) = request except TypeError: return ("ERROR", "Bad request format") - if not self.objtable.has_key(oid): + if oid not in self.objtable: return ("ERROR", "Unknown object id: %r" % (oid,)) obj = self.objtable[oid] if methodname == "__methods__": @@ -304,7 +304,7 @@ class SocketIO(object): # wait for notification from socket handling thread cvar = self.cvars[myseq] cvar.acquire() - while not self.responses.has_key(myseq): + while myseq not in self.responses: cvar.wait() response = self.responses[myseq] self.debug("_getresponse:%s: thread woke up: response: %s" % @@ -552,7 +552,7 @@ class RPCProxy(object): return MethodProxy(self.sockio, self.oid, name) if self.__attributes is None: self.__getattributes() - if self.__attributes.has_key(name): + if name in self.__attributes: value = self.sockio.remotecall(self.oid, '__getattribute__', (name,), {}) return value -- cgit v1.2.1