From b778db8145febb53e2ea9d3d8d73edc1c1d66310 Mon Sep 17 00:00:00 2001 From: "brett.cannon" Date: Sun, 3 Aug 2008 23:52:32 +0000 Subject: [PATCH] Remove a use of callable() in fileinput to silence a -3 warning. git-svn-id: http://svn.python.org/projects/python/trunk@65455 6015fed2-1504-0410-9fe1-9d1591cc4771 --- Lib/fileinput.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/fileinput.py b/Lib/fileinput.py index 19932ca8e6..ba48575209 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 -- 2.11.4.GIT