mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	Make use of new str.startswith/endswith semantics.
Occurences in email and compiler were ignored due to backwards compat requirements.
This commit is contained in:
		
							parent
							
								
									3ebef999e6
								
							
						
					
					
						commit
						b2afe855e5
					
				
					 11 changed files with 14 additions and 20 deletions
				
			
		|  | @ -127,7 +127,7 @@ def PathOk(self): | |||
|                                    parent=self) | ||||
|             self.entryPath.focus_set() | ||||
|             pathOk = False | ||||
|         elif path.startswith('www.') or path.startswith('http'): | ||||
|         elif path.startswith(('www.', 'http')): | ||||
|             pass | ||||
|         else: | ||||
|             if path[:5] == 'file:': | ||||
|  | @ -146,8 +146,7 @@ def Ok(self, event=None): | |||
|                            self.path.get().strip()) | ||||
|             if sys.platform == 'darwin': | ||||
|                 path = self.result[1] | ||||
|                 if (path.startswith('www') or path.startswith('file:') | ||||
|                     or path.startswith('http:')): | ||||
|                 if path.startswith(('www', 'file:', 'http:')): | ||||
|                     pass | ||||
|                 else: | ||||
|                     # Mac Safari insists on using the URI form for local files | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Georg Brandl
						Georg Brandl