Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #101950
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Yann Kaiser <kaiser.yann@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Same function but different names with different set of default arguments |
| Date | Thu, 21 Jan 2016 08:45:01 +0000 |
| Lines | 33 |
| Message-ID | <mailman.142.1453365911.15297.python-list@python.org> (permalink) |
| References | <n7q1ds$11rf$1@gioia.aioe.org> <CANUJvPUXhSyRRU2dJrdjP9qsaKX4ZCN7ioms6V4W9CgtTFcFcQ@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de /ixu1Mrcq9S+8xJKbjlmugKFv5sdDUJaYJjVjd0C9VMw== |
| Return-Path | <kaiser.yann@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.008 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; '21,': 0.07; 'kaiser': 0.07; 'subject:set': 0.09; 'thread': 0.10; 'jan': 0.11; 'def': 0.13; 'thu,': 0.15; ':-/': 0.16; 'code?': 0.16; 'paulo': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:default': 0.16; 'wrote:': 0.16; 'pfxlen:0': 0.18; 'email addr:gmail.com>': 0.18; 'to:2**1': 0.21; 'arguments': 0.22; 'header:In-Reply-To:1': 0.24; 'all.': 0.24; 'message- id:@mail.gmail.com': 0.27; 'fastest': 0.27; 'url:mailman': 0.30; 'url:python': 0.33; 'url:listinfo': 0.34; 'previous': 0.34; 'received:google.com': 0.35; 'something': 0.35; 'received:74.125.82': 0.35; 'url:org': 0.36; 'keyword': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'thanks': 0.37; 'url:mail': 0.40; 'to:addr:python.org': 0.40; 'subject:with': 0.40; 'default': 0.61; 'email,': 0.69; 'receive': 0.71; 'received:74.125.82.41': 0.84; 'treats': 0.84; 'bounce': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=Q0jIcKDrxJmF+2T2jefqnfxbFidoTSWr7lLgDPf4774=; b=RSQuDlVmxmuuFUz6Oqlms5ZAL/l30VjVneScovPEdKtOns0S0nV7ucgbdiWeuNTUHv 8gdXvRoTdNAnzeNP2n+Cuo7XhjVkbuAqrWcPhzgs+64YDGOBYPkTAvkoAHb0mS0H+Bjh l7rLwSpvSahZVIEjd7yhhEtOrwQrHLR3wrRPtbFSfdCrKMGo4uZCAfNRCpAheUCAsK88 l3nWAJih/eeLB2LNTuji1IPLAXafmh3Sq6LjXoIrr9t2lCvTmHD+ca7RSTfky58/VJAq +guWLlvXYQwbiEVvMaK8nKMjgkPMwOTjHEyDb8OX6QdOoX6ytNNJpE0gG+jdo994fjqX DxQw== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; bh=Q0jIcKDrxJmF+2T2jefqnfxbFidoTSWr7lLgDPf4774=; b=eTuSXnV8Q9Dr5aUtEtcUAiZdEGQ5fd1izVy2MY0xr56G6StQZwdoLnWJJfwgOQTdj/ gbZuFIj3dg7KuUrCC90FgFK5j/P8MqXKd0TJMn38YVS0/DdmurxNAKw8/Pi2Z8795Po2 A0Mt/mxNIqu8+Sr52rxzpOh22gAb6hYg2mgxqPEVCuQu5kn2VOpcju95dQ2hwety05DZ srasApTZdNULUoPTUXa6F+45YBpiUnBFj7/Z4CeSWo3UXmH3xu793TbleEGaSRlKFyP9 /dsdO5bXcX9eM48fapTVR/asCKd6jNq9G5i+HEemYwBaRR62taRiqJvtGC2GQVE+BB8Y vDrg== |
| X-Gm-Message-State | AG10YOSbV/fsQxzfJ8GDLGz7pE5nMfR6JBS1SrFFOgtB5cWGRsLS/XZYtFMWLXFSUo0NKA+butVfqFrj0E+36w== |
| X-Received | by 10.194.6.165 with SMTP id c5mr28931714wja.88.1453365910652; Thu, 21 Jan 2016 00:45:10 -0800 (PST) |
| In-Reply-To | <CANUJvPUXhSyRRU2dJrdjP9qsaKX4ZCN7ioms6V4W9CgtTFcFcQ@mail.gmail.com> |
| X-Content-Filtered-By | Mailman/MimeDel 2.1.20+ |
| 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> |
| Xref | csiph.com comp.lang.python:101950 |
Show key headers only | View raw
Apparently the thread poster cannot receive email, I just received a bounce on my previous email :-/ On Thu, Jan 21, 2016, 08:49 Yann Kaiser <kaiser.yann@gmail.com> wrote: > partial treats keyword arguments as default values, though they become > keyword-only as a result : > > f1 = functools.partial(g, p="p1") > > On Thu, Jan 21, 2016, 08:35 Paulo da Silva < > p_s_d_a_s_i_l_v_a_ns@netcabo.pt> wrote: > >> Hi all. >> >> What is the fastest implementation of the following code? >> >> def g(p): >> ... >> return something >> >> def f1(p="p1"): >> return g(p) >> >> def f2(p="p2"): >> return g(p) >> >> Thanks >> Paulo >> -- >> https://mail.python.org/mailman/listinfo/python-list >> >
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Same function but different names with different set of default arguments Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2016-01-21 07:30 +0000 Re: Same function but different names with different set of default arguments Yann Kaiser <kaiser.yann@gmail.com> - 2016-01-21 07:49 +0000 Re: Same function but different names with different set of default arguments Yann Kaiser <kaiser.yann@gmail.com> - 2016-01-21 08:45 +0000 Re: Same function but different names with different set of default arguments Peter Otten <__peter__@web.de> - 2016-01-21 10:26 +0100 Re: Same function but different names with different set of default arguments Steven D'Aprano <steve@pearwood.info> - 2016-01-21 23:24 +1100 Re: Same function but different names with different set of default arguments Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2016-01-23 20:03 +0000
csiph-web