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


Groups > comp.lang.python > #90288

Re: functions, optional parameters

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!border1.nntp.ams1.giganews.com!border2.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.053
X-Spam-Evidence '*H*': 0.90; '*S*': 0.01; 'true,': 0.05; 'none,': 0.07; 'differently.': 0.09; 'cc:addr:python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'literals,': 0.16; 'optional': 0.16; 'subject:parameters': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'specifically': 0.29; 'chris': 0.29; 'message-id:@mail.gmail.com': 0.30; 'cases': 0.33; 'could': 0.34; "can't": 0.35; 'common': 0.35; 'except': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'false': 0.36; 'pm,': 0.38; 'dave': 0.60; 'such': 0.63; 'evaluate': 0.72; '2015': 0.84; 'optimized,': 0.84; 'absolutely': 0.87; 'angel': 0.91; 'to:none': 0.92
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 :content-type; bh=uwwfky1muISgp9zHHJbgx8mwT/DitvM3rEVAgT0zMgU=; b=QGAqjfckIrlv5rbzyYxBEpaj/Au0WdOlMYxQB6vhI0/rzls3K6ogQ/9m4QiJQd1mBC dGwEAiRiVBaJBujC0/4q4aICidYy5A9MuuLR5d8e5k+GB+CnMXhnYkeL4XazV/NT4QAi 9PAOm9rqdasZWgYpMI0UrND3FcMld7Jn0GzlPifZY2FJIXvkI6ihQmCtzme9gTsg3Q7P J0GeOhQZJ8Lh0quScaLAJ29ayj3WvagQlzCYHbYn95oRdA3R648PC1KHZpszOnEXdo90 xRG/qbFKiTR4MxFm6MmuyX6OSMwRUo0lNt/wev0tFxaY92vcLUdpwfnVZ4FVtyAO3rmY ygIA==
MIME-Version 1.0
X-Received by 10.43.39.1 with SMTP id tk1mr6874595icb.26.1431268797992; Sun, 10 May 2015 07:39:57 -0700 (PDT)
In-Reply-To <554F4046.6000101@davea.name>
References <72lu1cxvmg.ln2@news.c0t0d0s0.de> <554cd511$0$12979$c3e8da3$5496439d@news.astraweb.com> <ui2v1cx5co.ln2@news.c0t0d0s0.de> <554ec664$0$13001$c3e8da3$5496439d@news.astraweb.com> <CAPTjJmq+XKq4SER-Hy-3RK=jAv-rHqNEw9ugJym_yH-d2GwFvQ@mail.gmail.com> <554F4046.6000101@davea.name>
Date Mon, 11 May 2015 00:39:57 +1000
Subject Re: functions, optional parameters
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
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>
Newsgroups comp.lang.python
Message-ID <mailman.309.1431268801.12865.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1431268801 news.xs4all.nl 2838 [2001:888:2000:d::a6]:52332
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:90288

Show key headers only | View raw


On Sun, May 10, 2015 at 9:25 PM, Dave Angel <davea@davea.name> wrote:
> On 05/09/2015 11:33 PM, Chris Angelico wrote:
>> What you could have is "late-binding semantics, optional early binding
>> as an optimization but only in cases where the result is
>> indistinguishable". That would allow common cases (int/bool/str/None
>> literals) to be optimized, since there's absolutely no way for them to
>> evaluate differently.
>>
>
> Except for literals, True, False and None, I can't see any way to optimize
> such a thing.

I did specifically say "literals" :)

ChrisA

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


Thread

functions, optional parameters Michael Welle <mwe012008@gmx.net> - 2015-05-08 13:59 +0200
  Re: functions, optional parameters Rustom Mody <rustompmody@gmail.com> - 2015-05-08 05:09 -0700
    Re: functions, optional parameters Michael Welle <mwe012008@gmx.net> - 2015-05-08 14:36 +0200
  Re: functions, optional parameters Chris Angelico <rosuav@gmail.com> - 2015-05-08 22:39 +1000
    Re: functions, optional parameters Michael Welle <mwe012008@gmx.net> - 2015-05-08 14:57 +0200
  Re: functions, optional parameters Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-09 01:24 +1000
    Re: functions, optional parameters Chris Angelico <rosuav@gmail.com> - 2015-05-09 02:02 +1000
      Re: functions, optional parameters Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-09 03:36 +1000
        Re: functions, optional parameters Chris Angelico <rosuav@gmail.com> - 2015-05-09 03:49 +1000
          Re: functions, optional parameters Mel Wilson <mwilson@the-wire.com> - 2015-05-08 18:49 +0000
          Re: functions, optional parameters Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-05-09 13:41 +1200
            Re: functions, optional parameters Chris Angelico <rosuav@gmail.com> - 2015-05-09 12:05 +1000
              Re: functions, optional parameters Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-05-09 19:27 +1200
          Re: functions, optional parameters Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-09 12:52 +1000
    Re: functions, optional parameters Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-09 03:26 +1000
    Re: functions, optional parameters Michael Welle <mwe012008@gmx.net> - 2015-05-08 17:50 +0200
      Re: functions, optional parameters Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-09 10:57 -0600
      Re: functions, optional parameters Chris Angelico <rosuav@gmail.com> - 2015-05-10 13:33 +1000
        Re: functions, optional parameters Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-10 15:20 +1000
          Re: functions, optional parameters Chris Angelico <rosuav@gmail.com> - 2015-05-10 18:59 +1000
      Re: functions, optional parameters Rustom Mody <rustompmody@gmail.com> - 2015-05-09 20:35 -0700
        Re: functions, optional parameters Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-10 15:25 +1000
      Re: functions, optional parameters Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-10 12:45 +1000
        Re: functions, optional parameters Dave Angel <davea@davea.name> - 2015-05-10 07:25 -0400
        Re: functions, optional parameters Chris Angelico <rosuav@gmail.com> - 2015-05-11 00:39 +1000
        Re: functions, optional parameters Michael Welle <mwe012008@gmx.net> - 2015-05-11 07:58 +0200
    Re: functions, optional parameters Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-08 09:48 -0600

csiph-web