diff options
author | Brett Cannon <bcannon@gmail.com> | 2008-08-03 23:52:32 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2008-08-03 23:52:32 (GMT) |
commit | 36bed8a25f0c0d255af94e90b533881d821e676a (patch) | |
tree | 030a9f08538f35010f7f538c443fcd373e55262b /Lib/fileinput.py | |
parent | c66b03a4c1e60d6ce896e1e5458f5dbf7140d2a8 (diff) | |
download | cpython-36bed8a25f0c0d255af94e90b533881d821e676a.zip cpython-36bed8a25f0c0d255af94e90b533881d821e676a.tar.gz cpython-36bed8a25f0c0d255af94e90b533881d821e676a.tar.bz2 |
Remove a use of callable() in fileinput to silence a -3 warning.
Diffstat (limited to 'Lib/fileinput.py')
-rw-r--r-- | Lib/fileinput.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/fileinput.py b/Lib/fileinput.py index 19932ca..ba48575 100644 --- a/Lib/fileinput.py +++ b/Lib/fileinput.py @@ -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 |