Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.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.023 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'python.': 0.02; 'received:134': 0.05; 'shame': 0.09; 'translate': 0.10; 'python': 0.11; 'better:': 0.16; 'finney': 0.16; 'loops': 0.16; 'statement.': 0.16; 'subject:python': 0.16; 'seems': 0.21; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'exists': 0.24; 'header:In- Reply-To:1': 0.27; 'chris': 0.29; 'towards': 0.31; 'subject:end': 0.31; 'way?': 0.31; 'writes:': 0.31; 'regular': 0.32; 'but': 0.35; 'sequence': 0.36; 'possible': 0.36; 'list': 0.37; 'ben': 0.38; 'filter': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'expression': 0.60; 'back': 0.62; 'kind': 0.63; 'map': 0.64; 'pardon': 0.84; 'sometimes.': 0.84; '\xe2\x80\xa6': 0.84; 'incorporated': 0.95 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqAEAAxGIFKGuA9G/2dsb2JhbABahzS9KIE1gxkBBSMPAUURCxoCBRYLAgIJAwIBAgEPNhMGAgKHawMPp0KIPg1XiGyBKYtcgnYWglKBNAOWCoFphhiGH4UvgyI Date: Fri, 30 Aug 2013 09:15:26 +0200 From: Antoon Pardon User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: python-list@python.org Subject: Re: semicolon at end of python's statements References: <1377735506.18906.15.camel@debian> <1FETt.52607$Mw4.14965@fx15.am4> <7wob8gywds.fsf@benfinney.id.au> <7wfvtrkcae.fsf@benfinney.id.au> In-Reply-To: <7wfvtrkcae.fsf@benfinney.id.au> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1377846933 news.xs4all.nl 15965 [2001:888:2000:d::a6]:36698 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:53282 Op 30-08-13 06:55, Ben Finney schreef: > Ben Finney writes: > >> Fábio Santos writes: >> >>> It is a shame that this is not possible in python. for..if exists in >>> comprehensions and not in regular loops but that would be nice >>> sometimes. >> for foo in (spam for spam in sequence if predicate(spam)): … > > Better: > > for foo in filter(predicate, sequence): > process(foo) Well better in what way? You now have to translate a predicate expression into a predicate function. Which AFAIU was one of the reasons to move away from map/filter to list comprehension. As I understand it, python made a move away from map and filter towards list comprehension. Chris seems to want some of the possibilities that came with that incorporated into the for statement. And your suggestion is to go back to the old kind of filter way. -- Antoon Pardon