From 5d1155c08edf7f53eca804b2b6538636c2dfe711 Mon Sep 17 00:00:00 2001 From: Florent Xicluna Date: Fri, 28 Oct 2011 14:45:05 +0200 Subject: Closes #13258: Use callable() built-in in the standard library. --- Lib/pickle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/pickle.py') diff --git a/Lib/pickle.py b/Lib/pickle.py index c770ff8bdf..1f45f37d46 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -364,7 +364,7 @@ class _Pickler: raise PicklingError("args from save_reduce() should be a tuple") # Assert that func is callable - if not hasattr(func, '__call__'): + if not callable(func): raise PicklingError("func from save_reduce() should be callable") save = self.save -- cgit v1.2.1