commit | 211b3cdbdc77fbfcdf7a1fb4f186f688e2d95ab0 | [log] [tgz] |
---|---|---|
author | Brett Cannon <bcannon@gmail.com> | Mon Aug 04 21:34:34 2008 +0000 |
committer | Brett Cannon <bcannon@gmail.com> | Mon Aug 04 21:34:34 2008 +0000 |
tree | f07d2056251283fe13ce3bb66d5ef1eba0f18eca | |
parent | d13e4ba4160dddad18380bdb2ae9aec6c6f43e00 [diff] [blame] |
Remove use of callable() from pickle to silence warnings under -3.
diff --git a/Lib/pickle.py b/Lib/pickle.py index 02a1b1d..9667781 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py
@@ -351,7 +351,7 @@ 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