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!newsfeed5.news.xs4all.nl!xs4all!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'case.': 0.05; '*args,': 0.07; 'override': 0.07; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'none.': 0.09; 'received:184.172': 0.09; 'received:gator410.hostgator.com': 0.09; '~ethan~': 0.09; 'cc:addr:python-list': 0.10; 'do,': 0.15; 'passing': 0.15; 'answers:': 0.16; 'operation,': 0.16; 'received:67.18.44': 0.16; 'received:72.11': 0.16; 'received:72.11.125': 0.16; 'received:72.11.125.166': 0.16; 'subject:import': 0.16; 'wrote:': 0.17; 'define': 0.20; 'parameters': 0.20; 'wednesday,': 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'pass': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'common': 0.26; 'instead.': 0.27; 'accomplished': 0.29; 'optional': 0.29; 'function': 0.30; 'code': 0.31; 'url:python': 0.32; 'function.': 0.33; 'another': 0.33; 'wanted': 0.36; "wasn't": 0.36; 'enough': 0.36; 'does': 0.37; 'quite': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'instead': 0.39; 'easily': 0.39; 'header:Received:5': 0.40; 'think': 0.40; 'july': 0.60; 'john': 0.60; 'within': 0.64; 'behavior': 0.64; 'making': 0.64; 'received:67.18': 0.65; 'want,': 0.65; 'reply': 0.66; 'furman': 0.84; 'run?': 0.84; 'url:lang': 0.84; 'ethan': 0.91 Date: Thu, 26 Jul 2012 14:23:02 -0700 From: Ethan Furman User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: John Ladasky Subject: Re: from future import pass_function References: <5010adb8$0$29978$c3e8da3$5496439d@news.astraweb.com> <6ef13dc9-ad5c-4ed7-9b5c-36f98cd90bb1@googlegroups.com> In-Reply-To: <6ef13dc9-ad5c-4ed7-9b5c-36f98cd90bb1@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator410.hostgator.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stoneleaf.us X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([192.168.10.136]) [72.11.125.166]:1373 X-Source-Auth: ethan+stoneleaf.us X-Email-Count: 1 X-Source-Cap: dG9idWs7dG9idWs7Z2F0b3I0MTAuaG9zdGdhdG9yLmNvbQ== Cc: python-list@python.org 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1343338475 news.xs4all.nl 6960 [2001:888:2000:d::a6]:41334 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:26120 John Ladasky wrote: > On Wednesday, July 25, 2012 9:32:33 PM UTC-7, Ethan Furman wrote: > >> What code does `pass` run? When do we pass parameters to `pass`? When >> do we need to override `pass`? >> >> Answers: None. Never. Still waiting for a reply from the OP for a use >> case. > > When I brought up this same issue some months ago... > > https://groups.google.com/forum/?fromgroups#!topic/comp.lang.python/CB_5fek2b8A > > ...it wasn't because I wanted to pass parameters to "pass", it was because I wanted to define a do-nothing function as an optional behavior within another function. In other words, I wanted to pass "pass." That's a reasonable thing to want, and quite easily accomplished by passing `lambda: None` or `lambda *args, **kwargs: None` instead. I don't think this is difficult to do, nor common enough to justify making every other `pass` a time-consuming do-nothing operation, instead of just a do-nothing operation ~Ethan~