Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!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: Tue, 15 Apr 2014 11:51:07 +1200 Lines: 14 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 VUZ1rDbCeiLmyr9E439Trwk5wJRRUnHXctjNkEMyw5wPYQc4fG Cancel-Lock: sha1:T7E6ITPWHtJ4fopc+j+pTA0cdi4= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: Xref: csiph.com comp.lang.python:70238 Mok-Kong Shen wrote: > I have yet a question out of curiosity: Why is my 2nd list structure, > that apparently is too complex for handling by eval and json, seemingly > not a problem for pickle? Pickle is intended for arbitrary data structures, so it is designed to be able to handle deeply-nested and/or recursive data. Eval only has to handle nesting to depths likely to be encountered in source code. Apparently the json parser also assumes you're not going to be using very deep nesting. -- Greg