mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	replace has_key with 'in' operator
This commit is contained in:
		
							parent
							
								
									de0559998f
								
							
						
					
					
						commit
						6e3dbbdf39
					
				
					 29 changed files with 71 additions and 71 deletions
				
			
		|  | @ -169,7 +169,7 @@ def localcall(self, seq, request): | |||
|             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 @@ def _getresponse(self, myseq, wait): | |||
|             # 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" % | ||||
|  | @ -550,7 +550,7 @@ def __getattr__(self, name): | |||
|             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 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Benjamin Peterson
						Benjamin Peterson