Path: csiph.com!usenet.pasdenom.info!news.franciliens.net!news.muarf.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!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.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; ';-)': 0.03; '*not*': 0.07; 'subject:Question': 0.07; 'language,': 0.12; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'roy': 0.16; 'subject:`': 0.16; 'unneeded': 0.16; 'wrote:': 0.18; 'performing': 0.26; 'header:In- Reply-To:1': 0.27; "i'm": 0.30; 'operations.': 0.31; 'there': 0.35; 'charset:us-ascii': 0.36; 'list': 0.37; 'to:addr:python- list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'promise': 0.68; 'smith': 0.68; 'behavior': 0.77; 'received:50.22': 0.84; 'imagine': 0.93 Date: Thu, 6 Feb 2014 21:11:30 -0600 From: Tim Chase To: python-list@python.org Subject: Re: Question about `list.insert` In-Reply-To: References: <4041bba7-91bc-4803-9150-2fcf14ecb5a9@googlegroups.com> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Authenticated-Sender: tim@thechases.com 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-Get-Message-Sender-Via: boston.accountservergroup.com: authenticated_id: tim@thechases.com X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1391742656 news.xs4all.nl 2843 [2001:888:2000:d::a6]:33339 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:65579 On 2014-02-06 22:00, Roy Smith wrote: > > list does not promise better than O(1) behavior > > I'm not aware of any list implementations, in any language, that > promises better than O(1) behavior for any operations. Perhaps > there is O(j), where you just imagine the operation was performed? Pish...there's always O(0) which is achieved by *not* performing some unneeded operation ;-) -tkc