Remove use of callable() from pickle to silence warnings under -3.

This commit is contained in:
Brett Cannon 2008-08-04 21:34:34 +00:00
parent d13e4ba416
commit 211b3cdbdc
1 changed files with 1 additions and 1 deletions

View File

@ -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