mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Replace file() with open()
This commit is contained in:
		
							parent
							
								
									2d726df26e
								
							
						
					
					
						commit
						7a4dbaf837
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -82,7 +82,7 @@ def checksyntax(self, filename): | ||||||
|         self.shell = shell = self.flist.open_shell() |         self.shell = shell = self.flist.open_shell() | ||||||
|         saved_stream = shell.get_warning_stream() |         saved_stream = shell.get_warning_stream() | ||||||
|         shell.set_warning_stream(shell.stderr) |         shell.set_warning_stream(shell.stderr) | ||||||
|         f = file(filename, 'r') |         f = open(filename, 'r') | ||||||
|         source = f.read() |         source = f.read() | ||||||
|         f.close() |         f.close() | ||||||
|         if '\r' in source: |         if '\r' in source: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Kurt B. Kaiser
						Kurt B. Kaiser