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


Groups > comp.lang.python > #95926

Re: Strange location for a comma

Path csiph.com!news.swapon.de!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!feeder.erje.net!1.eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <lac@openend.se>
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; 'skip:[ 20': 0.03; 'executable': 0.07; 'cc:addr:python-list': 0.09; 'arg': 0.09; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'tuple': 0.09; 'python': 0.10; 'def': 0.13; 'thu,': 0.15; 'cc:addr:lac': 0.16; 'cc:addr:openend.se': 0.16; 'comma,': 0.16; 'executables': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'message-id:@fido.openend.se': 0.16; 'parentheses': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'laura': 0.18; '>>>': 0.20; '2015': 0.20; 'cc:addr:python.org': 0.20; 'cc:2**1': 0.22; "aren't": 0.22; 'see:': 0.22; 'sep': 0.22; 'setup,': 0.22; 'import': 0.24; '+0200,': 0.27; 'values': 0.28; 'received:se': 0.29; 'separated': 0.29; 'cc:no real name:2**1': 0.29; 'program,': 0.29; 'url:python': 0.33; 'url:org': 0.36; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'version': 0.38; 'end': 0.39; 'why': 0.39; 'url:3': 0.60; 'header:Message-Id:1': 0.61; 'vous': 0.61; 'dont': 0.64; '>from': 0.76; 'header:In-reply- to:1': 0.84; 'subject:location': 0.84; 'url:tutorial': 0.91
To "ast" <nomail@invalid.com>
cc python-list@python.org, lac@openend.se
From Laura Creighton <lac@openend.se>
Subject Re: Strange location for a comma
In-reply-to <55e83afb$0$3157$426a74cc@news.free.fr>
References <55e83afb$0$3157$426a74cc@news.free.fr>
Comments In-reply-to "ast" <nomail@invalid.com> message dated "Thu, 03 Sep 2015 14:20:06 +0200."
MIME-Version 1.0
Content-Type text/plain; charset="us-ascii"
Content-ID <17630.1441284034.1@fido>
Content-Transfer-Encoding quoted-printable
Date Thu, 03 Sep 2015 14:40:34 +0200
X-Greylist Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [89.233.217.130]); Thu, 03 Sep 2015 14:40:36 +0200 (CEST)
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.60.1441284046.8327.python-list@python.org> (permalink)
Lines 44
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1441284046 news.xs4all.nl 23851 [2001:888:2000:d::a6]:36629
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:95926

Show key headers only | View raw


In a message of Thu, 03 Sep 2015 14:20:06 +0200, "ast" writes:
>Hello, 
>
>At the end of the last line of the following program,
>there is a comma, I dont understand why ?
>
>Thx
>
>
>from cx_Freeze import setup, Executable
>
># On appelle la fonction setup
>setup(
>    name = "salut",
>    version = "0.1",
>    description = "Ce programme vous dit bonjour",
>    executables = [Executable("salut.py")],    #  <--- HERE
>)

In python a tuple consists of a number of values separated by commas.
see: https://docs.python.org/3/tutorial/datastructures.html#tuples-and-sequences
or https://docs.python.org/2/tutorial/datastructures.html#tuples-and-sequences
for Python 2.

The round parentheses aren't significant.

So:

>>> def Executable(arg):
...     return arg
...
 >>> executables = [Executable("salut.py")],
 >>> executables
 (['salut.py'],)
>>>

Laura

  

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


Thread

Strange location for a comma "ast" <nomail@invalid.com> - 2015-09-03 14:20 +0200
  Re: Strange location for a comma "ast" <nomail@invalid.com> - 2015-09-03 14:28 +0200
    Re: Strange location for a comma Peter Otten <__peter__@web.de> - 2015-09-03 14:48 +0200
    Re: Strange location for a comma MRAB <python@mrabarnett.plus.com> - 2015-09-03 13:50 +0100
    Fwd: Strange location for a comma Vladimir Ignatov <kmisoft@gmail.com> - 2015-09-03 08:50 -0400
    Re: Strange location for a comma Tim Chase <python.list@tim.thechases.com> - 2015-09-03 09:36 -0500
    Re: Strange location for a comma Martin Komoň <martin@mkomon.cz> - 2015-09-03 14:34 +0200
  Re: Strange location for a comma Laura Creighton <lac@openend.se> - 2015-09-03 14:40 +0200
  Re: Strange location for a comma "ast" <nomail@invalid.com> - 2015-09-03 15:01 +0200
  Re: Strange location for a comma Laura Creighton <lac@openend.se> - 2015-09-03 15:02 +0200
  Re: Strange location for a comma "Sven R. Kunze" <srkunze@mail.de> - 2015-09-04 01:01 +0200

csiph-web