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


Groups > comp.lang.python > #106842

Re: Parens do create a tuple

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: Parens do create a tuple
Date Mon, 11 Apr 2016 13:02:21 +1000
Lines 21
Message-ID <mailman.15.1460343743.15650.python-list@python.org> (permalink)
References <neelcl$mer$1@gioia.aioe.org> <neeq6v$ruk$1@gioia.aioe.org> <1460333911.3449208.574628345.4B46CD32@webmail.messagingengine.com> <85r3ed2ctn.fsf_-_@benfinney.id.au> <CAPTjJmqXpXvDCJWPypvZodBbJ+hkf_Hizz9Cb-2-4MbLdv=-cQ@mail.gmail.com> <85inzp2c93.fsf@benfinney.id.au> <CAPTjJmp=VDKwgKNXgED2nbYqsQ4J0OfRxA6F4HLR5_oakOGpGA@mail.gmail.com> <857fg43orj.fsf@benfinney.id.au> <mailman.10.1460339107.15650.python-list@python.org> <570b0ca9$0$1608$c3e8da3$5496439d@news.astraweb.com> <1460343095.1633279.574715601.355BA760@webmail.messagingengine.com> <CAPTjJmrLU6GM1zTyc9NYmtd0SqxqvB9Ut9EWZtA2fLkqF7xC_w@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de u/EcJn5Zxbn9ROFT9hzE7AngXyXHVPxS5ZtFD/oDoJPg==
Return-Path <rosuav@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; 'received:209.85.223': 0.03; 'cpython': 0.05; '(self,': 0.07; '*args,': 0.07; 'cc:addr :python-list': 0.09; '(1,': 0.09; 'positional': 0.09; 'subject:create': 0.09; 'tuple': 0.09; 'def': 0.13; 'argument': 0.15; 'prototype': 0.15; '2016': 0.16; 'at.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'sequence,': 0.16; 'somewhere.': 0.16; 'tuple,': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'arguments': 0.22; 'pass': 0.22; 'second': 0.24; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'message-id:@mail.gmail.com': 0.27; 'built.': 0.29; 'sure,': 0.29; 'anywhere': 0.30; 'possibly': 0.32; "d'aprano": 0.33; 'steven': 0.33; 'received:google.com': 0.35; 'could': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'keyword': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'requirement': 0.37; 'detail': 0.38; 'received:209': 0.38; 'does': 0.39; 'ever': 0.60; 'chrisa': 0.84; 'execution.': 0.84; 'ultimately,': 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=2ktYyyvQCVOhOE2CZWODuIFLwOJ7tdAFMjT/2XE7/gE=; b=YIpgUj0hg3MZ9MehZcP+BnTqqFnlDimDIZIdlUh+MD3hJdcREr7mPxYLjOQZfJyK17 ALXP6ktmu7esBxmWdwesUn2Lfb98mM3311+jWyHIV4JDDAVIVZacm40o3MFlM//iJ2MS SKpBZAKG3XHqGM1UnsQj51SPL/QHb3y7L+1St25J3LixwWJgHJMIwLpJ7ewFzxVVZ5H2 mAjVsicf7X23OnMdRcWsLG+LR3D0gNP4aVZp0Y/aKeIxDjcSyG4nDLOH/WHBIf6OrPMr B8JmW7Rg5LbGvWkLph0Zj/ouuxCyXlb+s9pfG+XnCE3O90i2aYoeK/mTwKprdyPNLTJ4 hS6A==
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=2ktYyyvQCVOhOE2CZWODuIFLwOJ7tdAFMjT/2XE7/gE=; b=HD27HN8UotFtdG03PMGZjTDRD/fm47uwQ70Z53+wfTwD5am5JcsfmB3Fsi3hDt5uYc flObcRezQeuGDzxx8DLQIDSPJgEure/Wyu+ebTMEln1Apko4nLUrR4GHh/164NUyF8RU iG/UzKIUTDyOijy+11eLiygbVjf+8v85YL1HNGTiAEoO//GrE0bL1sLGC1AnqYSMKCsT 6sx6dzFFIg162Dz0vzsm3ml+l2uTVXkJM8SkQdqG82/R9uAo5yQMBPRfk9djtWn2261b Hdu9sp4Y4K0JiN4ncJoNTWsc1XX5iZqD7AQtN/d0zNwvDmD55frifZNC9JPr9F4UCEXN /BKg==
X-Gm-Message-State AD7BkJK7AY6ZuvgGMhcY6M2mvmaFEHJLr2J33M6PYzIpk9/SsCotdpL/ZnnJG7XqxpCjfzfrzlBfpH7jksk9SQ==
X-Received by 10.107.169.32 with SMTP id s32mr19325924ioe.19.1460343741381; Sun, 10 Apr 2016 20:02:21 -0700 (PDT)
In-Reply-To <1460343095.1633279.574715601.355BA760@webmail.messagingengine.com>
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>
X-Mailman-Original-Message-ID <CAPTjJmrLU6GM1zTyc9NYmtd0SqxqvB9Ut9EWZtA2fLkqF7xC_w@mail.gmail.com>
X-Mailman-Original-References <neelcl$mer$1@gioia.aioe.org> <neeq6v$ruk$1@gioia.aioe.org> <1460333911.3449208.574628345.4B46CD32@webmail.messagingengine.com> <85r3ed2ctn.fsf_-_@benfinney.id.au> <CAPTjJmqXpXvDCJWPypvZodBbJ+hkf_Hizz9Cb-2-4MbLdv=-cQ@mail.gmail.com> <85inzp2c93.fsf@benfinney.id.au> <CAPTjJmp=VDKwgKNXgED2nbYqsQ4J0OfRxA6F4HLR5_oakOGpGA@mail.gmail.com> <857fg43orj.fsf@benfinney.id.au> <mailman.10.1460339107.15650.python-list@python.org> <570b0ca9$0$1608$c3e8da3$5496439d@news.astraweb.com> <1460343095.1633279.574715601.355BA760@webmail.messagingengine.com>
Xref csiph.com comp.lang.python:106842

Show key headers only | View raw


On Mon, Apr 11, 2016 at 12:51 PM, Random832 <random832@fastmail.com> wrote:
> On Sun, Apr 10, 2016, at 22:32, Steven D'Aprano wrote:
>> def func(arg1, arg2, arg3):
>>     pass
>>
>> func(1, 2, 3)
>>
>> does not create a tuple (1, 2, 3) anywhere in its execution.
>
> Well, the second argument to PyObject_Call and function_call is a tuple,
> which had to come from somewhere. That may be a CPython implementation
> detail, but what else could __call__'s prototype be but (self, *args,
> **kwargs)?

On the arrivals side, sure, *args. But on the departures side, you can
use any sequence, and there's the whole thing of positional and
keyword arguments to look at. So ultimately, all you can possibly be
seeing is an implementation detail - there's no requirement that a
tuple ever be built.

ChrisA

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


Thread

Most probably a stupid question, but I still want to ask Fillmore <fillmore_remove@hotmail.com> - 2016-04-10 18:51 -0400
  Re: Most probably a stupid question, but I still want to ask Chris Angelico <rosuav@gmail.com> - 2016-04-11 08:58 +1000
  Re: Most probably a stupid question, but I still want to ask Ben Finney <ben+python@benfinney.id.au> - 2016-04-11 09:04 +1000
  Re: Most probably a stupid question, but I still want to ask Stephen Hansen <me+python@ixokai.io> - 2016-04-10 16:30 -0700
    Re: Most probably a stupid question, but I still want to ask Fillmore <fillmore_remove@hotmail.com> - 2016-04-10 20:17 -0400
      Re: Most probably a stupid question, but I still want to ask Stephen Hansen <me+python@ixokai.io> - 2016-04-10 17:32 -0700
      Re: Most probably a stupid question, but I still want to ask Terry Reedy <tjreedy@udel.edu> - 2016-04-10 21:45 -0400
        Re: Most probably a stupid question, but I still want to ask Marko Rauhamaa <marko@pacujo.net> - 2016-04-11 08:41 +0300
  one-element tuples [Was: Most probably a stupid question, but I still want to ask] Fillmore <fillmore_remove@hotmail.com> - 2016-04-10 20:13 -0400
    Re: one-element tuples [Was: Most probably a stupid question, but I still want to ask] Stephen Hansen <me+python@ixokai.io> - 2016-04-10 17:19 -0700
    Re: one-element tuples [Was: Most probably a stupid question, but I still want to ask] Stephen Hansen <me+python@ixokai.io> - 2016-04-10 17:18 -0700
    Re: one-element tuples [Was: Most probably a stupid question, but I still want to ask] Chris Angelico <rosuav@gmail.com> - 2016-04-11 10:20 +1000
    Re: one-element tuples [Was: Most probably a stupid question, but I still want to ask] Fillmore <fillmore_remove@hotmail.com> - 2016-04-10 20:22 -0400
      Re: one-element tuples [Was: Most probably a stupid question, but I still want to ask] Stephen Hansen <me+python@ixokai.io> - 2016-04-10 17:28 -0700
      Re: one-element tuples Ben Finney <ben+python@benfinney.id.au> - 2016-04-11 10:31 +1000
        Re: one-element tuples Fillmore <fillmore_remove@hotmail.com> - 2016-04-10 20:48 -0400
          Re: one-element tuples Ben Finney <ben+python@benfinney.id.au> - 2016-04-11 10:56 +1000
            Re: one-element tuples Grant Edwards <invalid@invalid.invalid> - 2016-04-11 14:10 +0000
              Re: one-element tuples Fillmore <fillmore_remove@hotmail.com> - 2016-04-11 10:11 -0400
                Re: one-element tuples Grant Edwards <invalid@invalid.invalid> - 2016-04-11 14:26 +0000
          Re: one-element tuples Ned Batchelder <ned@nedbatchelder.com> - 2016-04-10 18:00 -0700
          Re: one-element tuples Stephen Hansen <me+python@ixokai.io> - 2016-04-10 18:07 -0700
          Re: one-element tuples "Martin A. Brown" <martin@linux-ip.net> - 2016-04-10 18:08 -0700
            Re: one-element tuples Fillmore <fillmore_remove@hotmail.com> - 2016-04-10 23:19 -0400
              Re: one-element tuples Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-04-11 09:57 +0300
              Re: one-element tuples Larry Hudson <orgnut@yahoo.com> - 2016-04-11 23:01 -0700
          Re: one-element tuples Ben Finney <ben+python@benfinney.id.au> - 2016-04-11 11:36 +1000
            Re: one-element tuples Fillmore <fillmore_remove@hotmail.com> - 2016-04-10 22:57 -0400
              Re: one-element tuples Ben Finney <ben+python@benfinney.id.au> - 2016-04-11 14:10 +1000
                Re: one-element tuples Fillmore <fillmore_remove@hotmail.com> - 2016-04-11 00:43 -0400
                Re: one-element tuples Stephen Hansen <me+python@ixokai.io> - 2016-04-10 21:54 -0700
                Re: one-element tuples Ben Finney <ben+python@benfinney.id.au> - 2016-04-11 15:40 +1000
                Re: one-element tuples Rustom Mody <rustompmody@gmail.com> - 2016-04-10 22:07 -0700
          Re: one-element tuples BartC <bc@freeuk.com> - 2016-04-11 12:15 +0100
            Re: one-element tuples Marko Rauhamaa <marko@pacujo.net> - 2016-04-11 15:12 +0300
              Re: one-element tuples Grant Edwards <invalid@invalid.invalid> - 2016-04-11 14:12 +0000
    Re: one-element tuples [Was: Most probably a stupid question, but I still want to ask] Ben Finney <ben+python@benfinney.id.au> - 2016-04-11 10:30 +1000
    Re: one-element tuples [Was: Most probably a stupid question, but I still want to ask] MRAB <python@mrabarnett.plus.com> - 2016-04-11 01:33 +0100
      Re: one-element tuples [Was: Most probably a stupid question, but I still want to ask] Dan Sommers <dan@tombstonezero.net> - 2016-04-11 02:22 +0000
        Re: one-element tuples [Was: Most probably a stupid question, but I still want to ask] Chris Angelico <rosuav@gmail.com> - 2016-04-11 12:34 +1000
    Re: one-element tuples [Was: Most probably a stupid question, but I still want to ask] Chris Angelico <rosuav@gmail.com> - 2016-04-11 10:38 +1000
    Parens do create a tuple (was: one-element tuples [Was: Most probably a stupid question, but I still want to ask]) Ben Finney <ben+python@benfinney.id.au> - 2016-04-11 10:45 +1000
    Re: Parens do create a tuple (was: one-element tuples [Was: Most probably a stupid question, but I still want to ask]) Chris Angelico <rosuav@gmail.com> - 2016-04-11 10:50 +1000
    Re: Parens do create a tuple Ben Finney <ben+python@benfinney.id.au> - 2016-04-11 10:57 +1000
    Re: Parens do create a tuple Chris Angelico <rosuav@gmail.com> - 2016-04-11 11:04 +1000
    Re: Parens do create a tuple (was: one-element tuples [Was: Most probably a stupid question, but I still want to ask]) Stephen Hansen <me@ixokai.io> - 2016-04-10 18:03 -0700
    Re: Parens do create a tuple (was: one-element tuples [Was: Most probably a stupid question, but I still want to ask]) Tim Chase <python.list@tim.thechases.com> - 2016-04-10 19:52 -0500
    Re: Parens do create a tuple Ben Finney <ben+python@benfinney.id.au> - 2016-04-11 11:41 +1000
      Re: Parens do create a tuple Steven D'Aprano <steve@pearwood.info> - 2016-04-11 12:32 +1000
        Re: Parens do create a tuple Random832 <random832@fastmail.com> - 2016-04-10 22:51 -0400
          Re: Parens do create a tuple Steven D'Aprano <steve@pearwood.info> - 2016-04-11 14:08 +1000
            Re: Parens do create a tuple Random832 <random832@fastmail.com> - 2016-04-11 01:27 -0400
              Re: Parens do create a tuple Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-04-11 18:01 +1000
                Re: Parens do create a tuple Random832 <random832@fastmail.com> - 2016-04-11 09:42 -0400
        Re: Parens do create a tuple Chris Angelico <rosuav@gmail.com> - 2016-04-11 13:02 +1000
        Re: Parens do create a tuple Ben Finney <ben+python@benfinney.id.au> - 2016-04-11 14:08 +1000
    Re: Parens do create a tuple Chris Angelico <rosuav@gmail.com> - 2016-04-11 11:51 +1000
      Re: Parens do create a tuple Steven D'Aprano <steve@pearwood.info> - 2016-04-11 12:57 +1000
    Re: one-element tuples [Was: Most probably a stupid question, but I still want to ask] Tim Chase <python.list@tim.thechases.com> - 2016-04-10 19:46 -0500
  Re: Most probably a stupid question, but I still want to ask Steven D'Aprano <steve@pearwood.info> - 2016-04-11 11:50 +1000
    Re: Most probably a stupid question, but I still want to ask Fillmore <fillmore_remove@hotmail.com> - 2016-04-10 22:48 -0400
      Re: Most probably a stupid question, but I still want to ask Steven D'Aprano <steve@pearwood.info> - 2016-04-11 13:54 +1000
        Re: Most probably a stupid question, but I still want to ask Fillmore <fillmore_remove@hotmail.com> - 2016-04-11 00:03 -0400
          Re: Most probably a stupid question, but I still want to ask Stephen Hansen <me+python@ixokai.io> - 2016-04-10 21:46 -0700
            Re: Most probably a stupid question, but I still want to ask Rustom Mody <rustompmody@gmail.com> - 2016-04-10 22:18 -0700
              Re: Most probably a stupid question, but I still want to ask Stephen Hansen <me+python@ixokai.io> - 2016-04-10 22:42 -0700
                Re: Most probably a stupid question, but I still want to ask Rustom Mody <rustompmody@gmail.com> - 2016-04-10 23:57 -0700
          Re: Most probably a stupid question, but I still want to ask Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-04-11 17:50 +1000

csiph-web