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


Groups > comp.lang.python > #26062

Re: from future import pass_function

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <mhrivnak@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'example:': 0.03; 'syntax': 0.03; 'except:': 0.07; 'function,': 0.07; 'objects,': 0.07; 'try:': 0.07; 'type,': 0.07; 'callable': 0.09; 'objects.': 0.09; 'cc:addr:python-list': 0.10; 'def': 0.10; 'exercise': 0.13; 'language': 0.14; 'eckhardt': 0.16; 'expression.': 0.16; 'foo(object):': 0.16; 'gained': 0.16; 'statements,': 0.16; 'subject:import': 0.16; 'think?': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'sender:addr:gmail.com': 0.18; 'are.': 0.22; 'cc:2**0': 0.23; 'statement': 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; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'idea,': 0.29; 'occurred': 0.29; 'received:209.85.213.174': 0.29; 'received:mail- yx0-f174.google.com': 0.29; 'url:mailman': 0.29; 'class': 0.29; 'function': 0.30; 'url:python': 0.32; 'could': 0.32; 'print': 0.32; 'url:listinfo': 0.32; 'received:google.com': 0.34; 'nature': 0.35; 'similar': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'except': 0.36; 'michael': 0.36; 'but': 0.36; 'url:org': 0.36; 'does': 0.37; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'header:Received:5': 0.40; 'end': 0.40; 'url:mail': 0.40; 'think': 0.40; 'valuable': 0.60; 'day,': 0.60; 'most': 0.61; 'making': 0.64; 'importantly,': 0.65; 'jul': 0.65; 'embrace': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=bWMXyZP4XGD6uvlxKIY9meqRVGovMuIp2DLS5eVzmTU=; b=lrcdjcugJDCJ38hMKR2I1ah0R1NzPUFy0NdAl3NXsAsZ2Pzav+zgC/mrQts1ZxaVAV uZJyCdAIBo7KsLeYoPgD7KE5E1qWgmmSipJUO6GDZL93j5NjZCiKNflLCO141yiqxoAy j62zQdesXOJ1+UKFP1C2nqpVSVg9RyWtHLT/piCBhf745MkWzS4l0evdru1Sk2+uRD63 PTRzNcCw9ux/ELIG6laiYObdAmRRtsOyNCmvfrASkSh7ZSZ59+Thp0PBoOOjX8ZKZS7Z pBEjozFsHB5d9zMULXCaQeuXF0XKzhbvKmIvBnGVtmk/HG7jt5QzystXth7rfjTgv+gm SDKA==
MIME-Version 1.0
Sender mhrivnak@gmail.com
In-Reply-To <d1o4e9-tlr.ln1@satorlaser.homedns.org>
References <d1o4e9-tlr.ln1@satorlaser.homedns.org>
Date Thu, 26 Jul 2012 01:20:57 -0400
X-Google-Sender-Auth RuiXoF7DoQA7CHCsDjS-Mw3eogE
Subject Re: from future import pass_function
From Michael Hrivnak <mhrivnak@hrivnak.org>
To Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com>
Content-Type text/plain; charset=ISO-8859-1
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 <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.2587.1343280060.4697.python-list@python.org> (permalink)
Lines 45
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1343280060 news.xs4all.nl 6861 [2001:888:2000:d::a6]:50850
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:26062

Show key headers only | View raw


If we want pass(), then why not break() and continue()?  And also
def() and class()?  for(), while(), if(), with(), we can make them all
callable objects!

Except that they are control statements.  They are not objects, they
have no type, and they can never be evaluated in an expression.  And
most importantly, there is no value to be gained by making them
objects.

It is valuable for a language to have control statements, as others
have already explained.  This is an interesting exercise to think
about what their nature is, but at the end of the day, embrace them
for what they are.

Michael

On Wed, Jul 25, 2012 at 4:40 AM, Ulrich Eckhardt
<ulrich.eckhardt@dominolaser.com> 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.
>
> Example:
>    def pass():
>        return
>
>    try:
>        do_something()
>    except:
>        pass()
>
>
> One thing I don't like about this is the syntax
>
>    class foo(object):
>        pass()
>
>
> What do you think?
>
> Uli
> --
> http://mail.python.org/mailman/listinfo/python-list

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


Thread

from future import pass_function Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-07-25 10:40 +0200
  Re: from future import pass_function Philipp Hagemeister <phihag@phihag.de> - 2012-07-25 12:30 +0200
  Re: from future import pass_function Nicholas Cole <nicholas.cole@gmail.com> - 2012-07-25 11:33 +0100
  Re: from future import pass_function Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-07-25 07:02 -0400
  Re: from future import pass_function Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-07-25 11:33 +0000
    Re: from future import pass_function Ross Ridge <rridge@csclub.uwaterloo.ca> - 2012-07-25 21:42 -0400
      Re: from future import pass_function Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-07-26 02:38 +0000
        Re: from future import pass_function Ross Ridge <rridge@csclub.uwaterloo.ca> - 2012-07-25 23:30 -0400
          Re: from future import pass_function Chris Angelico <rosuav@gmail.com> - 2012-07-26 13:53 +1000
            Re: from future import pass_function Ross Ridge <rridge@csclub.uwaterloo.ca> - 2012-07-26 00:03 -0400
              Re: from future import pass_function Ethan Furman <ethan@stoneleaf.us> - 2012-07-25 21:32 -0700
                Re: from future import pass_function John Ladasky <john_ladasky@sbcglobal.net> - 2012-07-26 13:55 -0700
                Re: from future import pass_function Ethan Furman <ethan@stoneleaf.us> - 2012-07-26 14:23 -0700
                Re: from future import pass_function John Ladasky <john_ladasky@sbcglobal.net> - 2012-07-26 15:20 -0700
                Re: from future import pass_function John Ladasky <john_ladasky@sbcglobal.net> - 2012-07-26 15:20 -0700
                Re: from future import pass_function John Ladasky <john_ladasky@sbcglobal.net> - 2012-07-26 13:55 -0700
              Re: from future import pass_function Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-07-26 08:43 +0100
          Re: from future import pass_function alex23 <wuwei23@gmail.com> - 2012-07-25 21:20 -0700
        Re: from future import pass_function Rusi <rustompmody@gmail.com> - 2012-07-25 22:09 -0700
        Re: from future import pass_function Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-07-26 08:59 +0200
          Re: from future import pass_function Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-07-26 09:26 +0000
            Re: from future import pass_function Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-07-26 13:45 +0200
              Re: from future import pass_function Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-07-26 15:21 +0000
                Re: from future import pass_function Joel Goldstick <joel.goldstick@gmail.com> - 2012-07-26 12:55 -0400
                RE: from future import pass_function "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-07-26 17:19 +0000
                Re: from future import pass_function Chris Angelico <rosuav@gmail.com> - 2012-07-27 03:33 +1000
                Re: from future import pass_function Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-07-27 00:25 +0100
                Re: from future import pass_function Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-07-27 00:23 +0100
      Re: from future import pass_function alex23 <wuwei23@gmail.com> - 2012-07-25 21:17 -0700
  Re: from future import pass_function Chris Angelico <rosuav@gmail.com> - 2012-07-26 02:05 +1000
    Re: from future import pass_function Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-07-26 08:39 +0200
      Re: from future import pass_function Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-07-26 08:36 +0000
      Re: from future import pass_function Terry Reedy <tjreedy@udel.edu> - 2012-07-26 10:38 -0400
  Re: from future import pass_function Ethan Furman <ethan@stoneleaf.us> - 2012-07-25 09:28 -0700
  Re: from future import pass_function Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-07-25 12:48 -0400
  Re: from future import pass_function Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-07-25 14:17 -0400
  Re: from future import pass_function Michael Hrivnak <mhrivnak@hrivnak.org> - 2012-07-26 01:20 -0400
    Re: from future import pass_function Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-07-26 08:42 +0200
      Re: from future import pass_function Michael Hrivnak <mhrivnak@hrivnak.org> - 2012-07-26 17:15 -0400
  Re: from future import pass_function Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-07-26 08:50 +0100
    Re: from future import pass_function Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-07-27 08:39 +0200
  Re: from future import pass_function Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-07-26 05:16 -0400
  Re: from future import pass_function Chris Angelico <rosuav@gmail.com> - 2012-07-26 19:42 +1000
  Re: from future import pass_function Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-07-26 06:00 -0400
  Re: from future import pass_function rusi <rustompmody@gmail.com> - 2012-07-26 08:01 -0700
  Re: from future import pass_function Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-07-26 14:01 -0400
  Re: from future import pass_function Chris Angelico <rosuav@gmail.com> - 2012-07-27 04:14 +1000
  Re: from future import pass_function John Ladasky <john_ladasky@sbcglobal.net> - 2012-07-26 13:48 -0700
    Re: from future import pass_function Ian Kelly <ian.g.kelly@gmail.com> - 2012-07-26 15:18 -0600
    Re: from future import pass_function Ethan Furman <ethan@stoneleaf.us> - 2012-07-26 15:35 -0700
    Re: from future import pass_function Terry Reedy <tjreedy@udel.edu> - 2012-07-27 00:21 -0400
  Re: from future import pass_function Michael Hrivnak <mhrivnak@hrivnak.org> - 2012-07-26 17:20 -0400

csiph-web