Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'cpython': 0.05; 'subject:file': 0.07; 'url:blog': 0.09; 'lookup': 0.09; 'cc:addr :python-list': 0.10; '-tkc': 0.16; 'dictionaries': 0.16; 'efficiency.': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'message-id:@tim.thechases.com': 0.16; 'received:70.251': 0.16; 'received:dsl.rcsntx.swbell.net': 0.16; 'received:rcsntx.swbell.net': 0.16; 'received:swbell.net': 0.16; 'wrote:': 0.17; 'cc:no real name:2**0': 0.24; 'cc:2**1': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'andrew': 0.27; 'hash': 0.29; "i'm": 0.29; 'becomes': 0.30; 'wrong': 0.34; 'pm,': 0.35; 'table': 0.35; 'url:org': 0.36; 'too': 0.36; 'subject:: ': 0.38; 'where': 0.40; 'received:50.22': 0.84; 'glad': 0.86; 'increases': 0.91; 'sensibly': 0.91; 'angel': 0.93; 'poorly': 0.93 Date: Thu, 09 Aug 2012 17:39:22 -0500 From: Tim Chase User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111120 Icedove/3.1.16 MIME-Version: 1.0 To: d@davea.name Subject: Re: save dictionary to a file without brackets. References: <930ab3d8-4ab9-446d-9970-ee811eb70a44@googlegroups.com> <50241F14.2060209@tim.thechases.com> <36EA3847-6713-4C12-B47B-9B5E10325F00@gmail.com> <502429C3.5000600@tim.thechases.com> <5024392D.3010306@davea.name> In-Reply-To: <5024392D.3010306@davea.name> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Source: X-Source-Args: X-Source-Dir: Cc: python-list@python.org, Andrew Cooper 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1344551893 news.xs4all.nl 6886 [2001:888:2000:d::a6]:52514 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:26826 On 08/09/12 17:26, Dave Angel wrote: > On 08/09/2012 06:03 PM, Andrew Cooper wrote: > I'm glad you're wrong for CPython's dictionaries. The only time the > lookup would degenerate to O[n] would be if the hash table had only one > slot. CPython sensibly increases the hash table size when it becomes > too small for efficiency. > > Where have you seen dictionaries so poorly implemented? PHP? http://www.phpclasses.org/blog/post/171-PHP-Vulnerability-May-Halt-Millions-of-Servers.html -tkc