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).
This commit is contained in:
Guido van Rossum 1999-10-10 21:14:25 +00:00
parent c4eb6a6afd
commit 08a92cb568
1 changed files with 2 additions and 1 deletions

View File

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