mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
Remove use of callable() from pickle to silence warnings under -3.
This commit is contained in:
parent
d13e4ba416
commit
211b3cdbdc
1 changed files with 1 additions and 1 deletions
|
@ -351,7 +351,7 @@ class Pickler:
|
||||||
raise PicklingError("args from reduce() should be a tuple")
|
raise PicklingError("args from reduce() should be a tuple")
|
||||||
|
|
||||||
# Assert that func is callable
|
# Assert that func is callable
|
||||||
if not callable(func):
|
if not hasattr(func, '__call__'):
|
||||||
raise PicklingError("func from reduce should be callable")
|
raise PicklingError("func from reduce should be callable")
|
||||||
|
|
||||||
save = self.save
|
save = self.save
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue