Kaydet (Commit) 36bed8a2 authored tarafından Brett Cannon's avatar Brett Cannon

Remove a use of callable() in fileinput to silence a -3 warning.

üst c66b03a4
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment