Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'discard': 0.05; 'python': 0.09; 'iterate': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'terry': 0.09; 'resulting': 0.13; 'eckhardt': 0.16; 'mean,': 0.16; 'message-id:@dough.gmane.org': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject:import': 0.16; 'unneeded': 0.16; 'wrote:': 0.17; 'jan': 0.18; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'creating': 0.26; 'am,': 0.27; 'change,': 0.27; 'header:X-Complaints-To:1': 0.28; '"do': 0.29; 'probably': 0.29; 'function': 0.30; 'code': 0.31; 'could': 0.32; 'function.': 0.33; 'null': 0.33; 'to:addr:python-list': 0.33; 'list': 0.35; 'especially': 0.35; 'something': 0.35; 'list.': 0.35; 'received:org': 0.36; 'created': 0.36; 'but': 0.36; 'should': 0.36; 'bad': 0.37; 'does': 0.37; 'subject:: ': 0.38; 'nothing': 0.38; 'possible.': 0.38; 'to:addr:python.org': 0.39; 'list,': 0.39; 'header:Received:5': 0.40; 'first': 0.61; 'within': 0.64; 'proceedures,': 0.84; 'received:fios.verizon.net': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: from future import pass_function Date: Thu, 26 Jul 2012 10:38:28 -0400 References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-251-66.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 In-Reply-To: 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1343313543 news.xs4all.nl 6924 [2001:888:2000:d::a6]:58877 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:26092 On 7/26/2012 2:39 AM, Ulrich Eckhardt wrote: > I have seen code that just created a list comprehension to iterate over > something but was discarding the results. If you mean, discard the resulting list, that is probably bad code as it should not create the list in the first place. A generator expression or for loop will iterate without creating an unneeded list. > That could be a case for a "do nothing" function. Such code does do something within the comprehension. > Just having a function that does nothing Not possible. None is the default return. Python does not have proceedures, and that is not going to change, especially for a null proceedure. -- Terry Jan Reedy