summaryrefslogtreecommitdiffstats
path: root/Lib/pickle.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-10-10 21:14:25 (GMT)
committerGuido van Rossum <guido@python.org>1999-10-10 21:14:25 (GMT)
commit08a92cb56874537b88a224e9fcd6a3d89a5a703b (patch)
tree7e03427bf8bce182a7024d69fc265aeeb3bef22c /Lib/pickle.py
parentc4eb6a6afd7d3a1e0c13b6b021f3bd91e3b47fd7 (diff)
downloadcpython-08a92cb56874537b88a224e9fcd6a3d89a5a703b.zip
cpython-08a92cb56874537b88a224e9fcd6a3d89a5a703b.tar.gz
cpython-08a92cb56874537b88a224e9fcd6a3d89a5a703b.tar.bz2
Jeremy writes:
I found the following patch helpful in tracking down a bug in some code. I had appended time, the module, instead of time.time(). Not sure if it is generally true that printing the repr of the object is good, but I expect that most unpicklable things will have fairly information and concise reprs (like files or sockets or modules).
Diffstat (limited to 'Lib/pickle.py')
-rw-r--r--Lib/pickle.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py
index 7164eb1..5cc92bf 100644
--- a/Lib/pickle.py
+++ b/Lib/pickle.py
@@ -157,7 +157,8 @@ class Pickler:
reduce = object.__reduce__
except AttributeError:
raise PicklingError, \
- "can't pickle %s objects" % `t.__name__`
+ "can't pickle %s object: %s" % (`t.__name__`,
+ `object`)
else:
tup = reduce()
else: