mirror of
https://github.com/python/cpython.git
synced 2025-07-31 07:04:42 +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 @@ class FileInput:
|
|||
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