Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!gegeweb.org!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'e.g.,': 0.07; 'type,': 0.07; 'here?': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'message- id:@post.gmane.org': 0.16; 'reason?': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'exists': 0.17; 'all,': 0.21; 'header:User-Agent:1': 0.26; 'replace': 0.27; 'header:X-Complaints-To:1': 0.28; 'far,': 0.29; 'subject:what': 0.29; 'point': 0.31; 'anybody': 0.32; 'achieving': 0.33; 'to:addr:python-list': 0.33; 'received:org': 0.36; 'really': 0.36; 'but': 0.36; 'charset:us-ascii': 0.36; 'best,': 0.37; 'object': 0.38; 'sure': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'think': 0.40; 'situation': 0.62; 'dear': 0.66; 'subject:good': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Wolfgang Maier Subject: itertools.filterfalse - what is it good for Date: Fri, 8 Mar 2013 16:45:03 +0000 (UTC) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 192.52.32.195 (Mozilla/5.0 (Windows NT 6.2; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0) 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1362761126 news.xs4all.nl 6947 [2001:888:2000:d::a6]:56180 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:40868 Dear all, can anybody point out a situation where you really need itertools.filterfalse() ? So far, I couldn't think of a case where you couldn't replace it with a generator expression/if combination. e.g., a=filterfalse(lambda x: x%2, range(1,101)) b=(i for i in range(1,101) if not i % 2) do not return the same object type, but otherwise are achieving the same thing. What am I missing here? For sure filterfalse exists for a reason? Best, Wolfgang