Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.017 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'cpython': 0.05; 'memory.': 0.05; 'instance.': 0.09; 'wrote:': 0.15; '3.2.1': 0.16; 'he/she': 0.16; 'semanchuk': 0.16; 'subject: \n ': 0.16; 'subject:database': 0.16; 'subject:wrong': 0.16; 'thunderbird': 0.16; 'pm,': 0.16; 'received:209.85.210.174': 0.19; 'received:mail- iy0-f174.google.com': 0.19; 'header:In-Reply-To:1': 0.22; 'point,': 0.25; 'xml': 0.25; 'windows': 0.26; 'id:': 0.29; 'edited': 0.30; 'class': 0.31; 'subject:?': 0.31; 'message- id:@gmail.com': 0.32; "i'll": 0.33; 'to:addr:python-list': 0.34; 'header:User-Agent:1': 0.34; 'quite': 0.34; 'file': 0.36; 'but': 0.37; 'received:192': 0.38; 'received:google.com': 0.38; 'received:209.85': 0.38; 'user': 0.38; 'subject:: ': 0.38; 'something': 0.38; 'problems': 0.38; 'received:192.168.1': 0.39; 'data': 0.39; 'rest': 0.39; 'to:addr:python.org': 0.39; 'might': 0.39; 'received:209': 0.40; 'easily': 0.61; '(one': 0.67; '5.0': 0.84; "program's": 0.84; 'subject:should': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=inKwrgYrhSEh76PI8hMkkue4KS38plZcuUq6i64s1do=; b=Nv748EqxstnHHrUDncY/fSP6q5KjnbTAxIXpg4x0fwPneJT16IRTqdVhw6AJhmt6q5 1ctsfe34uGBT9BVjWdpfbTnfoomLSaq5jsYA4b+R56dTHFBE++XELGH+JWbDEAhn9zXF Qqw75M9PO5a45fa3Yo2kyKOeVj387zfMVI56c= Date: Sun, 31 Jul 2011 17:26:54 -0500 From: Andrew Berg User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: "comp.lang.python" Subject: Re: Deeply nested dictionaries - should I look into a database or am I just doing it wrong? References: In-Reply-To: X-Enigmail-Version: 1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1312151243 news.xs4all.nl 23903 [2001:888:2000:d::a6]:53724 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:10637 On 2011.07.31 03:53 PM, Philip Semanchuk wrote: > To the OP -- if you're looking to write this to disk, I recommend XML or SQLite. I have a method that writes the data to disk, but at this point, I don't see any problems with just pickling the class instance. XML might be a good way to provide something easily read and edited by humans, though (one major goal of the class design is to let the user provide as much or as little info as he/she wants with a pickle or config/XML file and provide the rest with the program's interface). I doubt I'll use a database for storage; it's quite practical to keep everything in memory. -- CPython 3.2.1 | Windows NT 6.1.7601.17592 | Thunderbird 5.0 PGP/GPG Public Key ID: 0xF88E034060A78FCB