summaryrefslogtreecommitdiff
path: root/Lib/pickle.py
diff options
context:
space:
mode:
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2008-11-04 00:35:10 +0000
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2008-11-04 00:35:10 +0000
commit4fbf2957aca5e3d6487e0f14aba8e6639f9d5525 (patch)
treea168436ce87d24e98764d0bdb2c93ba230fa7907 /Lib/pickle.py
parent7637f858365cbe7e817acb3d30a5401470b79cd7 (diff)
downloadcpython-4fbf2957aca5e3d6487e0f14aba8e6639f9d5525.tar.gz
Sorry, r67092 is commit miss....
Diffstat (limited to 'Lib/pickle.py')
-rw-r--r--Lib/pickle.py13
1 files changed, 0 insertions, 13 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py
index 2e55c8a710..37c3d5262f 100644
--- a/Lib/pickle.py
+++ b/Lib/pickle.py
@@ -345,9 +345,6 @@ class _Pickler:
else:
self.write(PERSID + str(pid).encode("ascii") + b'\n')
- def _isiter(self, obj):
- return hasattr(obj, '__next__') and hasattr(obj, '__iter__')
-
def save_reduce(self, func, args, state=None,
listitems=None, dictitems=None, obj=None):
# This API is called by some subclasses
@@ -360,16 +357,6 @@ class _Pickler:
if not hasattr(func, '__call__'):
raise PicklingError("func from save_reduce() should be callable")
- # Assert that listitems is an iterator
- if listitems is not None and not self._isiter(listitems):
- raise PicklingError("listitems from save_reduce() should be an "
- "iterator")
-
- # Assert that dictitems is an iterator
- if dictitems is not None and not self._isiter(dictitems):
- raise PicklingError("dictitems from save_reduce() should be an "
- "iterator")
-
save = self.save
write = self.write