Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: MemoryError in data conversion Date: Wed, 16 Apr 2014 00:08:25 +1200 Lines: 10 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net +AObpl5a65+2k9I4dNhTvQq8c05Ot54/tXRZ1Zh0iVokCB1zz7 Cancel-Lock: sha1:bD1O8QKvWi/rQSTFl9SvKUWH6r4= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: Xref: csiph.com comp.lang.python:70270 Mok-Kong Shen wrote: > (It means that I have > to pickle out the list to a file and read in the content of > the file in order to have it as a bytearray etc. etc.) No, you don't -- pickle.dumps() returns the pickled data as a bytes object instead of writing it to a file. -- Greg