mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	Remove a use of callable() in fileinput to silence a -3 warning.
This commit is contained in:
		
							parent
							
								
									c66b03a4c1
								
							
						
					
					
						commit
						36bed8a25f
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -226,7 +226,7 @@ def __init__(self, files=None, inplace=0, backup="", bufsize=0, | |||
|         self._mode = mode | ||||
|         if inplace and openhook: | ||||
|             raise ValueError("FileInput cannot use an opening hook in inplace mode") | ||||
|         elif openhook and not callable(openhook): | ||||
|         elif openhook and not hasattr(openhook, '__call__'): | ||||
|             raise ValueError("FileInput openhook must be callable") | ||||
|         self._openhook = openhook | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brett Cannon
						Brett Cannon