diff options
author | Brett Cannon <bcannon@gmail.com> | 2008-08-04 21:34:34 +0000 |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2008-08-04 21:34:34 +0000 |
commit | 121848b049bd1927c1967cb522f85b3eb456f51c (patch) | |
tree | 1301f51d143f41f611832d57d22fcc06dbae5bf0 | |
parent | 2c057cacc14d143cab057eba42d7dd305012cba1 (diff) | |
download | cpython-121848b049bd1927c1967cb522f85b3eb456f51c.tar.gz |
Remove use of callable() from pickle to silence warnings under -3.
-rw-r--r-- | Lib/pickle.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |