summaryrefslogtreecommitdiffstats
path: root/Lib/copy_reg.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/copy_reg.py')
-rw-r--r--Lib/copy_reg.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/copy_reg.py b/Lib/copy_reg.py
index 92cbd53..8a3550a 100644
--- a/Lib/copy_reg.py
+++ b/Lib/copy_reg.py
@@ -53,6 +53,8 @@ def _reduce(self):
if base is object:
state = None
else:
+ if base is self.__class__:
+ raise TypeError, "can't pickle %s objects" % base.__name__
state = base(self)
args = (self.__class__, base, state)
try: