pickle.dump (obj, conn)

Ian Kelly ian.g.kelly at gmail.com
Thu Mar 13 21:26:55 EDT 2014


On Thu, Mar 13, 2014 at 4:36 PM, Pedro Izecksohn <izecksohn at yahoo.com> wrote:
>   Shouldn't pickle.dump (obj, conn) raise an Exception if conn is a TCP
> connection that was closed by the remote host?

Can you be more specific about what you are doing, what you expect the
result to be, and what the actual result is?

http://www.catb.org/esr/faqs/smart-questions.html#beprecise

If I try using pickle.dump with a socket, I do get an exception, but
perhaps not the one you are looking for:

>>> pickle.dump([1,2,3], sock)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: file must have a 'write' attribute



More information about the Python-list mailing list