From 211b3cdbdc77fbfcdf7a1fb4f186f688e2d95ab0 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 4 Aug 2008 21:34:34 +0000 Subject: [PATCH] Remove use of callable() from pickle to silence warnings under -3. --- Lib/pickle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/pickle.py b/Lib/pickle.py index 02a1b1d1ae..9667781a8c 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -351,7 +351,7 @@ class Pickler: raise PicklingError("args from reduce() should be a tuple") # Assert that func is callable - if not callable(func): + if not hasattr(func, '__call__'): raise PicklingError("func from reduce should be callable") save = self.save -- 2.40.0