Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'argument': 0.04; 'compiler': 0.05; 'function,': 0.07; 'none)': 0.07; 'expense': 0.09; 'pointless': 0.09; 'received:mail-lpp01m010-f46.google.com': 0.09; '(like': 0.15; 'agree.': 0.16; 'eckhardt': 0.16; 'subject:import': 0.16; 'wrote:': 0.17; 'restrictions': 0.17; 'thu,': 0.17; 'code.': 0.20; 'bit': 0.21; 'wednesday,': 0.22; 'posted': 0.22; 'statement': 0.23; 'idea': 0.24; 'pass': 0.25; 'header:In-Reply-To:1': 0.25; 'wrote': 0.26; 'common': 0.26; 'see,': 0.27; 'thoughts': 0.27; 'message-id:@mail.gmail.com': 0.27; 'idea,': 0.29; 'occurred': 0.29; 'though.': 0.29; "i'm": 0.29; 'received:209.85.215.46': 0.30; 'function': 0.30; 'url:python': 0.32; 'could': 0.32; 'print': 0.32; 'to:addr:python- list': 0.33; "can't": 0.34; 'received:google.com': 0.34; 'pm,': 0.35; 'similar': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'but': 0.36; 'should': 0.36; 'itself': 0.37; 'does': 0.37; 'two': 0.37; 'rather': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'science': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'july': 0.60; 'john': 0.60; 'kind': 0.61; 'here:': 0.62; '26,': 0.65; 'jul': 0.65; 'eight': 0.71; 'complexity': 0.84; 'to:name:python': 0.84; 'url:lang': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=n0Yu5pRp2lRVw6ko66Sv2e7fPtSsyWfkhnLlE5Ue3XE=; b=zVgXrlkRheRIacgi7+XqX0KXLUbKam5CDDMBNcZVI4mI2gaxsrmnwJld48yN+5XXZP kdgTyJmyTIDTBB1JdNnw84khP3Y78pvfozWgKpEJwLKyhwIph1TZVx+vAWuQxhyiJP3k vWfnu1X3wN7Y0EjI9yGOB3vzwwR5e5GFoctDXcenje6yBza4Qr0TsuzCYLJGnWV99HBd tkbrJjbhekUz29RaNlg8AQ3T4q4BvT1sKXKb1Dss2PvRTDgmj9QqjJ3zGc0IAfATHExo GGGajwWtW18d/DixwFQ95Jj+mlB4287aTmAtFqZW8h79fq0LC3x+VHx0/4PuCn1RhZPv oHfA== MIME-Version: 1.0 In-Reply-To: <5571fa66-edf7-4fb4-8ae4-87ad70c32abc@googlegroups.com> References: <5571fa66-edf7-4fb4-8ae4-87ad70c32abc@googlegroups.com> From: Ian Kelly Date: Thu, 26 Jul 2012 15:18:28 -0600 Subject: Re: from future import pass_function To: Python 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1343337541 news.xs4all.nl 6858 [2001:888:2000:d::a6]:60097 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:26118 On Thu, Jul 26, 2012 at 2:48 PM, John Ladasky wrote: > On Wednesday, July 25, 2012 1:40:45 AM UTC-7, Ulrich Eckhardt wrote: >> Hi! >> >> I just had an idea, it occurred to me that the pass statement is pretty >> similar to the print statement, and similarly to the print() function, >> there could be a pass() function that does and returns nothing. > > I had very similar thoughts about eight months ago, and posted them here: > > https://groups.google.com/forum/?fromgroups#!topic/comp.lang.python/CB_5fek2b8A > > I'm no computer science guru, but the idea that pass should be a function rather than a statement continues to appeal to me. As you can see, I actually wrote just such a function so that I could use it as an argument in my code. As long as 1) the name can't be reassigned (like None) and 2) the compiler is able to optimize it out when used by itself as a statement (to avoid incurring the expense of a common but pointless name lookup), then I kind of agree. The added complexity of those two restrictions detracts a bit from the appeal to elegance, though.