Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #15885

Re: What exactly is "pass"? What should it be?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python@mrabarnett.plus.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'from:addr:python': 0.09; 'none)': 0.09; 'run.': 0.09; 'def': 0.14; 'this:': 0.15; '(functions': 0.16; 'arg2,': 0.16; 'bieber': 0.16; 'declaimed': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'pythonic': 0.16; 'received:84.92': 0.16; 'received:84.92.122': 0.16; 'received:84.92.122.60': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'reply-to:addr:python-list': 0.16; 'subject:pass': 0.16; "wouldn't": 0.16; 'wrote:': 0.18; 'trying': 0.21; 'process,': 0.21; 'dropped': 0.23; 'name?': 0.23; 'header :In-Reply-To:1': 0.23; 'times,': 0.24; 'code': 0.25; 'statement': 0.25; "i'm": 0.26; 'function': 0.27; 'lee': 0.28; 'pass': 0.28; 'explicit': 0.28; 'looks': 0.28; 'implicitly': 0.30; 'none,': 0.30; 'equivalent': 0.30; 'subject:?': 0.31; "i'll": 0.31; 'nov': 0.31; 'thu,': 0.32; 'to:addr:python-list': 0.32; 'header:User- Agent:1': 0.33; 'received:84': 0.34; 'reply-to:addr:python.org': 0.34; 'subject:What': 0.34; 'which,': 0.34; 'none': 0.36; 'progress': 0.39; 'subject:: ': 0.39; 'might': 0.39; 'to:addr:python.org': 0.39; 'skip:_ 10': 0.40; 'being': 0.40; 'skip:l 20': 0.40; 'more': 0.60; 'john': 0.62; '2011': 0.62; 'header:Reply-To:1': 0.70; 'reply-to:no real name:2**0': 0.71; 'dennis': 0.77; '-0800': 0.84; 'subject:should': 0.84
X-CM-Score 0.00
X-CNFS-Analysis v=2.0 cv=Pfh9d1dd c=1 sm=1 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=9jsOeB20M3cA:10 a=kSBkHLp2fS8A:10 a=OUOv7kDek9cA:10 a=8nJEP1OIZ-IA:10 a=cPkqpWC4AAAA:8 a=qDypH7ppUJfhDJ9dsfkA:9 a=wPNLvfGTeEIA:10 a=j8cdLw6X6zAA:10 a=0nF1XD0wxitMEM03M9B4ZQ==:117
X-AUTH mrabarnett:2500
Date Fri, 18 Nov 2011 13:03:28 +0000
From MRAB <python@mrabarnett.plus.com>
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version 1.0
To python-list@python.org
Subject Re: What exactly is "pass"? What should it be?
References <27955957.352.1321582691251.JavaMail.geo-discussion-forums@prap37> <ja4n8b$dor$2@dough.gmane.org>
In-Reply-To <ja4n8b$dor$2@dough.gmane.org>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
Reply-To python-list@python.org
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2826.1321621390.27778.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1321621390 news.xs4all.nl 6869 [2001:888:2000:d::a6]:60502
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:15885

Show key headers only | View raw


On 18/11/2011 04:34, Dennis Lee Bieber wrote:
> On Thu, 17 Nov 2011 18:18:11 -0800 (PST), John Ladasky
> <ladasky@my-deja.com>  declaimed the following in
> gmane.comp.python.general:
>
>> I'm trying to write tidy, modular code which includes a long-running process.  From time to time I MIGHT like to check in on the progress being made by that long-running process, in various ways.  Other times, I'll just want to let it run.  So I have a section of code which, generally, looks like this:
>>
>> def _pass(*args):
>>      pass
>>
> 	This is the equivalent of
>
> def _pass(*args):
> 	return None
>
Wouldn't "pass_" be a more Pythonic name?

> (functions with no explicit return statement implicitly return None)
>
>> def long_running_process(arg1, arg2, arg_etc, report = _pass):
>>      result1 = do_stuff()
>>      report(result1)
>
> 	So this is a call to a function that just returns a None, which is
> dropped by the interpreter...
>

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

What exactly is "pass"?  What should it be? John Ladasky <ladasky@my-deja.com> - 2011-11-17 18:18 -0800
  Re: What exactly is "pass"? What should it be? Chris Rebert <clp2@rebertia.com> - 2011-11-17 18:45 -0800
    Re: What exactly is "pass"? What should it be? John Ladasky <ladasky@my-deja.com> - 2011-11-17 21:03 -0800
    Re: What exactly is "pass"? What should it be? John Ladasky <ladasky@my-deja.com> - 2011-11-17 21:03 -0800
  Re: What exactly is "pass"? What should it be? Chris Angelico <rosuav@gmail.com> - 2011-11-18 13:59 +1100
    Re: What exactly is "pass"? What should it be? alex23 <wuwei23@gmail.com> - 2011-11-17 22:04 -0800
  Re: What exactly is "pass"? What should it be? Dominic Binks <dbinks@codeaurora.org> - 2011-11-17 19:01 -0800
  Re: What exactly is "pass"?  What should it be? Ben Finney <ben+python@benfinney.id.au> - 2011-11-18 14:45 +1100
  Re: What exactly is "pass"?  What should it be? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-11-17 20:34 -0800
    Re: What exactly is "pass"?  What should it be? John Ladasky <ladasky@my-deja.com> - 2011-11-17 21:07 -0800
      Re: What exactly is "pass"? What should it be? Chris Angelico <rosuav@gmail.com> - 2011-11-18 16:34 +1100
      Re: What exactly is "pass"? What should it be? Chris Rebert <clp2@rebertia.com> - 2011-11-17 21:49 -0800
      Re: What exactly is "pass"?  What should it be? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-11-18 06:07 +0000
    Re: What exactly is "pass"?  What should it be? John Ladasky <ladasky@my-deja.com> - 2011-11-17 21:07 -0800
    Re: What exactly is "pass"?  What should it be? Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-11-18 10:57 +0100
  Re: What exactly is "pass"?  What should it be? MRAB <python@mrabarnett.plus.com> - 2011-11-18 13:03 +0000

csiph-web