Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '"if': 0.04; 'cpython': 0.05; 'attribute.': 0.09; 'attributes,': 0.09; 'context.': 0.09; 'cc:addr:python-list': 0.15; 'alex23': 0.16; 'attribute,': 0.16; 'cpython,': 0.16; 'name"': 0.16; 'received:209.85.213.174': 0.16; 'received:mail-yx0-f174.google.com': 0.16; 'spec,': 0.16; 'subject:() ': 0.16; 'wrote:': 0.18; 'cc:no real name:2**0': 0.21; "doesn't": 0.23; 'breaks': 0.23; 'header:In-Reply-To:1': 0.23; 'string': 0.23; 'cc:2**0': 0.25; "i'm": 0.26; 'not.': 0.27; 'url:mailman': 0.27; 'fix': 0.29; 'cc:addr:python.org': 0.29; 'message-id:@mail.gmail.com': 0.29; 'sun,': 0.30; 'equivalent': 0.30; 'subject:?': 0.31; 'nov': 0.31; 'pm,': 0.31; 'values': 0.31; 'url:listinfo': 0.32; 'does': 0.32; "isn't": 0.32; 'implies': 0.34; 'url:python': 0.35; 'anything': 0.36; 'example,': 0.36; 'two': 0.37; 'comments': 0.38; 'received:google.com': 0.38; 'received:209.85': 0.38; 'url:org': 0.38; 'should': 0.39; 'subject:: ': 0.39; 'received:209': 0.40; 'more': 0.60; '2011': 0.62; 'comment.': 0.84; 'spec': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=tMdH0c6UNcoZTQRq7qLXS+RYB7rubYaD3aJwgHEnOAQ=; b=fHcZMMUqPQzQSm4FVhvWj8eHgA8KwvK8Z7SJuKft9/mNqMKbL271uS4LJImag7vQbZ w3rgvon4OQpdLccX2l9YP8YR8d/vmJjynSYNibAaSDYedYB3JhaZSZ84J4yDPX6MtG6E zwNy31lPuYI8nu12ABPGgct72GR/6x6mcMUb0= MIME-Version: 1.0 In-Reply-To: <2b46d46c-f66d-4a13-8c0b-af9b6c638863@h30g2000pro.googlegroups.com> References: <436fb6a3-1075-45a6-8f93-5612d050b11a@q35g2000prh.googlegroups.com> <4eb9e9c2$0$29988$c3e8da3$5496439d@news.astraweb.com> <4ebb08b6$0$29970$c3e8da3$5496439d@news.astraweb.com> <4EBC1B54.6000308@stoneleaf.us> <4ebc592b$0$29970$c3e8da3$5496439d@news.astraweb.com> <4ebdc961$0$29970$c3e8da3$5496439d@news.astraweb.com> <2b46d46c-f66d-4a13-8c0b-af9b6c638863@h30g2000pro.googlegroups.com> From: Devin Jeanpierre Date: Sun, 13 Nov 2011 23:48:45 -0500 Subject: Re: all() is slow? To: alex23 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org 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: 37 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1321246170 news.xs4all.nl 6878 [2001:888:2000:d::a6]:37187 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:15656 > It states equivalence for two values _based on the name_. I don't know what you mean. "Based on the name" doesn't mean anything in particular to me in this context. > So you're outright ignoring the comments that this behaviour is to > make CPython more performant? I don't see how I'm ignoring the comment. Yes, breaking the spec improves performance. Is that a reason to not fix the spec, or something? Devin On Sun, Nov 13, 2011 at 9:50 PM, alex23 wrote: > On Nov 13, 4:28=C2=A0pm, Devin Jeanpierre wrote: >> > which implies that getattr(x, 'a!b') should be equivalent to x.a!b >> >> No, it does not. The documentation states equivalence for two >> particular values > > It states equivalence for two values _based on the name_. > > "If the string is the name of one of the object=E2=80=99s attributes, the > result is the value of that attribute. For example, getattr(x, > 'foobar') is equivalent to x.foobar." > > The string 'a!b' is the name of the attribute, ergo getattr(x, 'a!b') > _is_ x.a!b. If x.a!b isn't valid CPython, then etc. > >> CPython breaks that equivalence > > So you're outright ignoring the comments that this behaviour is to > make CPython more performant? > -- > http://mail.python.org/mailman/listinfo/python-list >