Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'python': 0.09; '*is*': 0.09; 'aug': 0.13; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'infinitely': 0.16; 'innermost': 0.16; 'iterating': 0.16; 'nest': 0.16; 'subject:Objects': 0.16; 'wrote:': 0.17; 'thu,': 0.17; 'variables': 0.17; 'variable': 0.20; 'received:209.85.214.174': 0.21; 'names.': 0.22; 'header:In-Reply-To:1': 0.25; 'message- id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'lines': 0.28; 'chris': 0.28; "d'aprano": 0.29; 'enforce': 0.29; 'steven': 0.29; 'related': 0.30; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'wrong': 0.34; 'doing': 0.35; 'pm,': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'there': 0.35; 'but': 0.36; 'useful': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'nothing': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'called': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'six': 0.65 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=SwK0qxOoNF6IYYNuxDvbDk/HS1CAWhb8jBcvliNJGn0=; b=rNrQTCUsGtOQLJIFwhAbc7WGK39LrM7zYTZpVDFVdCY4ys0kMSA+d1j+qwQC/GQv5g gDQZJYLja65liV96x4qraxDx08hwQc4jitz1S5Vk+t/jTDx/NJmPNFlw6rP0t0kMBWfY Q9k5HFkMXLSYt23mXstAR4wGmksUdL5EZ/d84eu4/Wl1SAJR9c1jV324jVCstx5VhhKn iRy1d4oJeGYG3Pizl/qGskfJNct6ufllpk82kuPhZLAzXX8xdGjC9sZAc0Gv+bYgsyVP HliXWRxgIbiDp8LWUjnjJsZ60TwWWsZJQyx7tt+QAl0E+xr16iroJW272tsPwzBSomgz j2qA== MIME-Version: 1.0 In-Reply-To: <5035ad87$0$1645$c3e8da3$76491128@news.astraweb.com> References: <18409992-1e28-4721-8e64-60c69668da4e@googlegroups.com> <1pidnX71rLNrsajNnZ2dnUVZ8jCdnZ2d@bt.com> <5035ad87$0$1645$c3e8da3$76491128@news.astraweb.com> Date: Thu, 23 Aug 2012 15:26:10 +1000 Subject: Re: Objects in Python From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 1345699573 news.xs4all.nl 6842 [2001:888:2000:d::a6]:34554 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:27698 On Thu, Aug 23, 2012 at 2:11 PM, Steven D'Aprano wrote: > On Thu, 23 Aug 2012 12:02:16 +1000, Chris Angelico wrote: > >> 2) Related to the above, you can infinitely nest scopes. There's nothing >> wrong with having six variables called 'q'; you always use the innermost >> one. Yes, this can hurt readability > > Well, there you go. There *is* something wrong with having six variables > called 'q'. But it's the same thing that's wrong with having one variable called 'q', when that variable would be better called 'invoice' because it's iterating over your invoices, or 'item' when it's iterating over the lines of one invoice. Python doesn't stop you from doing that; it's not the language's job to enforce useful variable names. ChrisA