Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'sufficient': 0.05; 'expressions': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:while': 0.09; 'subtle': 0.09; 'python': 0.11; 'expression.': 0.16; 'finney': 0.16; 'quoted': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'header:User-Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; "doesn't": 0.30; 'errors': 0.30; 'robert': 0.30; 'url:wiki': 0.31; 'url:wikipedia': 0.31; 'writes:': 0.31; 'material': 0.36; 'url:org': 0.36; 'loss': 0.38; 'ben': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'skip:u 10': 0.60; 'easy': 0.60; 'worth': 0.66; 'between': 0.67; 'inline': 0.74; 'received:125': 0.84; 'subject:Extension': 0.84; 'responses': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Re: Extension of while syntax Date: Fri, 12 Dec 2014 14:14:29 +1100 References: <14d2b880-3837-4267-a769-33ae7393f78b@googlegroups.com> <857fxxfv9u.fsf@benfinney.id.au> <019f01d015b7$a2da0520$e88e0f60$@us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: jigong.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:gqxgkSBSEwUYECYy4303anJ4FFc= 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1418354073 news.xs4all.nl 2895 [2001:888:2000:d::a6]:43518 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:82410 (Please don't top-post; instead, interleave responses inline with the quoted material and trim the excess. See .) "Clayton Kirkwood" writes: > I would prefer: > while value = initial_value in undesired_values: > value = get_some_value() The easy confusion between ‘=’ and ‘==’ in a condition is sufficient that Python doesn't allow the ‘=’ operation in an expression. I think that the subtle errors avoided by that is worth the loss of expressions like the above. -- \ “Pity the meek, for they shall inherit the earth.” —Donald | `\ Robert Perry Marquis | _o__) | Ben Finney