mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	Issue 21469: Minor code modernization (convert and/or expression to an if/else expression).
Suggested by: Tal Einat
This commit is contained in:
		
							parent
							
								
									51669d8c18
								
							
						
					
					
						commit
						38acd4c028
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -172,7 +172,7 @@ def applies_to(self, filename): | ||||||
|         return self.path == "*" or filename.startswith(self.path) |         return self.path == "*" or filename.startswith(self.path) | ||||||
| 
 | 
 | ||||||
|     def __str__(self): |     def __str__(self): | ||||||
|         return (self.allowance and "Allow" or "Disallow") + ": " + self.path |         return ("Allow" if self.allowance else "Disallow") + ": " + self.path | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class Entry: | class Entry: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Raymond Hettinger
						Raymond Hettinger