Kaydet (Commit) 08a92cb5 authored tarafından Guido van Rossum's avatar Guido van Rossum

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).
üst c4eb6a6a
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment