Pickling dictionaries containing dictionaries: failing, recursion-style!

Paul Rubin http
Sat Dec 1 17:49:27 EST 2007


John Machin <sjmachin at lexicon.net> writes:
> self.words is obviously an iterable (can you see "for word in
> self.words" in his code?), probably just a list.

It could be a file, in which case its iterator method would read lines
from the file and cause that error message.  But I think the answer is
that the pickle itself needs to be opened in binary mode, as someone
else posted.



More information about the Python-list mailing list