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


Groups > comp.lang.python > #105943

Re: List of Functions

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: List of Functions
Date Tue, 29 Mar 2016 14:33:13 +1100
Lines 25
Message-ID <mailman.125.1459222396.28225.python-list@python.org> (permalink)
References <3c44f0f8-d701-463e-bf2c-f5871c51bddf@googlegroups.com> <87bn5z1mkd.fsf@bsb.me.uk> <lf5d1qf2g7v.fsf@ling.helsinki.fi> <56f9c104$0$1604$c3e8da3$5496439d@news.astraweb.com> <87y492xaqh.fsf@bsb.me.uk>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de tc39FTLPGkmEN8RQL5Sp9ARIrNVOklwvpBCzlnjZNcJg==
Return-Path <rosuav@gmail.com>
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; 'difference,': 0.07; 'expressions': 0.07; 'stops': 0.07; 'cc:addr:python-list': 0.09; 'identifier': 0.09; 'meaningful': 0.09; 'mess': 0.09; 'statements': 0.09; '(but': 0.15; '"def"': 0.16; '2016': 0.16; 'arrived': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'keywords.': 0.16; 'lambda': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'anonymous': 0.22; 'suppose': 0.22; 'defined': 0.23; 'bit': 0.23; "python's": 0.23; 'written': 0.24; 'header:In-Reply-To:1': 0.24; 'possibility': 0.27; 'message- id:@mail.gmail.com': 0.27; 'function': 0.28; 'this.': 0.28; 'indentation': 0.29; "i'm": 0.30; 'code': 0.30; 'probably': 0.31; 'maybe': 0.33; 'subject:List': 0.33; 'definition': 0.34; 'languages': 0.34; 'tue,': 0.34; 'received:google.com': 0.35; 'could': 0.35; 'done': 0.35; 'designer': 0.35; 'but': 0.36; 'needed': 0.36; 'received:209.85': 0.36; 'keyword': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'being': 0.37; 'received:209.85.213': 0.37; 'received:209': 0.38; 'why': 0.39; 'sure': 0.39; 'some': 0.40; 'more': 0.63; 'mar': 0.65; 'chrisa': 0.84; 'late,': 0.84; 'to:none': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc; bh=AKYSqe5lT37LZzDZMlNCAKBlXLEzooUIWZJm43F82gg=; b=qBcZ3yVyW/IY1srov6ZgLTTshEbtGUyZP91Wxrxp3iHurcdDWiJsLp5V1S0mM+8GmQ zy6W+prxpYkSzhC1jOKN2u4DikKUkcsWnFk29bYFYIgsqN/S9qoq+1R2QXTfLfmpKrAW 35l3J2cMk/t8VNfzmftCgG1pJ5wvLTCMeWV5xpfYwslWSwoK+PLSOYFg3aDyxzxUDBFX gOB9K/eaOP0W4dju/1aLfx25ctoOkHKE29p+nDndfDAXGGWbrPh+VZibxBGFP4f8OUaY FMBOCG2vk5UMLcASiTc+B7+inYcj1tSrOMw0h9LZIEqyCDT7CyDgKhXSI+pQrxJb4gIR 7ENg==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc; bh=AKYSqe5lT37LZzDZMlNCAKBlXLEzooUIWZJm43F82gg=; b=QMVIiypCIrp8R/5anINA50aBYuF6IdavV+vJVu1WfU4V9J03lQZLHs7UjS/g2cCN3I /XFLQvJeXitWFmsM6HFIb1iLVVS3Np3tKbx87mKBWfzTQAzq/KVMda345ppUvGtsecoc zy7bUV7tahusSrB7MO7rE0lOmNg5Gsy2KoD2Vuk+YSvJk/0wzSf5QhyjawfcWu1TTjkf M0atnMaOYqUCLdyzC6E2W+Io1/1EabPnwB4uZzZ9NdYTvBSNNyJLTI8Riu+D5X12dcY2 uBPMHmERr0LYpwoBmp2dixFAmnw4e1KN6EBusSG2o3pMpcrI9kF/ad4lmKW2VRv4Nqop xjlQ==
X-Gm-Message-State AD7BkJID+kKlDbLQBq9rzqLkBg8JS6Ja6wyogViel5Fc0b6BM2mV57mHb3j8pOLEahoxawdtqDKWhXuJ8IvvSw==
X-Received by 10.50.138.233 with SMTP id qt9mr424571igb.13.1459222393498; Mon, 28 Mar 2016 20:33:13 -0700 (PDT)
In-Reply-To <87y492xaqh.fsf@bsb.me.uk>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:105943

Show key headers only | View raw


On Tue, Mar 29, 2016 at 1:45 PM, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
> If functions were defined
>
>   fun f(x): return x * x
>
> then an anonymous function could be written as a function definition but
> the name
>
>   fun (x): return x * x
>
> I suppose you could do that even with "def" but it's a bit less
> mnemonic.
>
> There's probably a good reason why this was not done -- maybe it stops
> the grammar being LL(1)?  And if lambda's arrived late, and a new
> keyword is needed to flag a function expression, then lambda is
> appealing to the designer since it's less likely to be in use as an
> identifier in existing code than many more meaningful keywords.

Some languages are exactly like this. I'm not sure what the reason is
for Python's difference, but one possibility is the mess that comes
from having statements inside expressions when indentation is
significant to statements (but free-form in expressions).

ChrisA

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


Thread

List of Functions Richard Riehle <rriehle@itu.edu> - 2016-03-27 12:38 -0700
  Re: List of Functions Erik <python@lucidity.plus.com> - 2016-03-28 00:10 +0100
  Re: List of Functions Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-03-28 01:19 +0100
    Re: List of Functions Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-03-28 10:51 +0300
      Re: List of Functions Marko Rauhamaa <marko@pacujo.net> - 2016-03-28 11:58 +0300
        Re: List of Functions Dan Sommers <dan@tombstonezero.net> - 2016-03-28 12:39 +0000
          Re: List of Functions Marko Rauhamaa <marko@pacujo.net> - 2016-03-28 16:40 +0300
            Re: List of Functions Chris Angelico <rosuav@gmail.com> - 2016-03-29 08:40 +1100
              Re: List of Functions Steven D'Aprano <steve@pearwood.info> - 2016-03-29 09:52 +1100
                Re: List of Functions Chris Angelico <rosuav@gmail.com> - 2016-03-29 10:40 +1100
                Re: List of Functions Marko Rauhamaa <marko@pacujo.net> - 2016-03-29 07:49 +0300
              Re: List of Functions Marko Rauhamaa <marko@pacujo.net> - 2016-03-29 07:45 +0300
                Re: List of Functions Chris Angelico <rosuav@gmail.com> - 2016-03-29 16:00 +1100
      Re: List of Functions Steven D'Aprano <steve@pearwood.info> - 2016-03-29 10:40 +1100
        Re: List of Functions Random832 <random832@fastmail.com> - 2016-03-28 19:50 -0400
        Re: List of Functions Chris Angelico <rosuav@gmail.com> - 2016-03-29 10:54 +1100
        Re: List of Functions Rustom Mody <rustompmody@gmail.com> - 2016-03-28 19:23 -0700
        Re: List of Functions Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-03-29 03:45 +0100
          Re: List of Functions Chris Angelico <rosuav@gmail.com> - 2016-03-29 14:33 +1100
          Re: List of Functions Rustom Mody <rustompmody@gmail.com> - 2016-03-28 23:21 -0700
            Re: List of Functions Marko Rauhamaa <marko@pacujo.net> - 2016-03-29 09:50 +0300
            Re: List of Functions Christian Gollwitzer <auriocus@gmx.de> - 2016-03-29 08:52 +0200

csiph-web