Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.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.029 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'complaining': 0.07; 'identifier,': 0.09; 'cc:addr:python-list': 0.15; 'conceivably': 0.16; 'subject:() ': 0.16; 'cheers,': 0.18; 'wrote:': 0.18; 'say,': 0.19; 'cc:no real name:2**0': 0.21; "doesn't": 0.23; 'equally': 0.23; 'feature.': 0.23; 'though.': 0.23; 'header:In- Reply-To:1': 0.23; 'do,': 0.24; 'cc:2**0': 0.25; 'fact': 0.27; 'somebody': 0.27; 'not.': 0.27; 'invalid': 0.28; 'skip:" 30': 0.28; 'bit': 0.28; 'cc:addr:python.org': 0.29; 'message- id:@mail.gmail.com': 0.29; 'subject:?': 0.31; 'nov': 0.31; 'pm,': 0.31; 'received:209.85.161.46': 0.31; 'received:mail- fx0-f46.google.com': 0.31; 'thu,': 0.32; 'that,': 0.33; 'however,': 0.34; 'received:209.85.161': 0.35; 'instead.': 0.36; 'think': 0.37; 'could': 0.38; 'somewhat': 0.38; 'received:google.com': 0.38; 'received:209.85': 0.38; "i'd": 0.39; "it's": 0.39; 'subject:: ': 0.39; 'might': 0.39; 'received:209': 0.40; '2011': 0.62; 'further': 0.64; 'care': 0.70; 'funny': 0.73; 'case?': 0.84 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; bh=1Plydc4zkq1+DWOfkQEPT3qGN5ggTQef9g9+/BxRkO4=; b=hqSCxBP5UEMnL/YJuB4WnEkJjvHLhaI3hWBqGhy7un0HH+IgRYOxkCXutsMYiBy0Hy F22cjwSk7b/SgYr9edFalzMbajW7jwOB0t7irYfmsT9EY4gFDIg8IWZ7ZoM68Pe1XG5r NbWqpUSXPbKQ+qmOjHSzKihCNucWuOOoNZOtQ= MIME-Version: 1.0 In-Reply-To: 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> From: Ian Kelly Date: Thu, 10 Nov 2011 14:19:18 -0700 Subject: Re: all() is slow? To: Devin Jeanpierre Content-Type: text/plain; charset=ISO-8859-1 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1320959990 news.xs4all.nl 6888 [2001:888:2000:d::a6]:38595 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:15562 On Thu, Nov 10, 2011 at 1:37 PM, Devin Jeanpierre wrote: > Of course not. I do, however, think that it's conceivable that I'd > want to key a namedtuple by an invalid identifier, and to do that, > yes, I'd need to use getattr(). Care to give a real use case? You could even go a step further and use, say, arbitrary ints as names if you're willing to give up getattr() and use "ob.__class__.__dict__[42].__get__(ob, ob.__class__)" everywhere instead. The fact that somebody might conceivably want to do this doesn't make it a good idea, though. I do find it a bit funny that you're criticizing a somewhat smelly implementation detail by complaining that it doesn't support an equally smelly feature. Cheers, Ian