Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!feeder2.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.84.MISMATCH!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.070 X-Spam-Evidence: '*H*': 0.86; '*S*': 0.00; 'python': 0.09; 'notation.': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'iterator': 0.16; 'iterator.': 0.16; 'operator': 0.16; 'mon,': 0.16; 'wrote:': 0.20; 'header:In-Reply-To:1': 0.21; 'received:209.85.210.174': 0.21; 'received:mail- iy0-f174.google.com': 0.21; 'personally,': 0.23; 'structure': 0.23; 'message-id:@mail.gmail.com': 0.23; 'tim': 0.24; "python's": 0.25; 'made.': 0.29; 'granted,': 0.30; 'am,': 0.31; 'moving': 0.31; 'to:addr:python-list': 0.32; 'quite': 0.32; 'similar': 0.33; 'does': 0.33; 'received:209.85': 0.34; 'it.': 0.34; 'received:google.com': 0.34; 'assignment': 0.35; 'symbol': 0.35; 'received:209': 0.36; 'pretty': 0.36; 'but': 0.36; 'issue': 0.38; 'being': 0.39; 'happened': 0.39; 'to:addr:python.org': 0.39; 'subject:, ': 0.60; 'your': 0.61; 'making': 0.62; 'cause': 0.65; '26,': 0.67; 'mar': 0.69; '2012': 0.74; '12:03': 0.84; 'advantages.': 0.84; 'confusion.': 0.91 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=rgAOjdoSI5rWuGMKDTOfU+epWpNDVYwnEXlzKnJOILA=; b=Ipaso7+upNHUvzFtgtycuSsmsGf1PEY7ZAPgrYe9Sf4ZU+pWPvOIBFUdiOjy4uBu/W 6Tis6HDoyZip7XYjO/vB7UJ9qWtgcxcZHzL0OFdrmZRuVDlMsYHp1RXlQEsIdmYch1Qi 55p6q6IynF8u2JzHXezZNT1tkjwTzxKqkvjS5PjIwxJ/0SnHi8Mls7rxIu/60TGp+Lam hiUDCDzq1S1NrXWIYfEBXQ05WvIJr18awertc0rSOPD/VQVJsPVkIq39b3rbzzn/1riS udVsjpC4Aqa2OsLCXPKmqEOq+Xf0ALJsH/5vR+0TbyuD+gMcvAF64VTOOLhJVFxe6sKv b0yA== MIME-Version: 1.0 In-Reply-To: <4F6F1792.1060709@tim.thechases.com> References: <4f6d0060$0$6634$9b4e6d93@newsspool2.arcor-online.net> <4f6f0d24$0$6561$9b4e6d93@newsspool4.arcor-online.net> <4F6F1792.1060709@tim.thechases.com> Date: Mon, 26 Mar 2012 00:11:22 +1100 Subject: Re: Documentation, assignment in expression. 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: 1332681086 news.xs4all.nl 6907 [2001:888:2000:d::a6]:40124 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:22137 On Mon, Mar 26, 2012 at 12:03 AM, Tim Chase wrote: > Granted, this can be turned into an iterator with a yield, making the issue > somewhat moot: No, just moving the issue to the iterator. Your iterator has exactly the same structure in it. Personally, I quite like assignment-in-conditional notation. Yes, it's a pretty common cause of problems; but what happened to the "consenting adults" policy? Python permits operator overloading and even the reassignment of builtins, both of which can cause similar confusion. But, that's the choice Python's made. And being able to use the same symbol for assignment and comparison does have its advantages. ChrisA