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: 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" cc: python-list@python.org, lac@openend.se From: Laura Creighton 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" 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 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 =3D "salut", > version =3D "0.1", > description =3D "Ce programme vous dit bonjour", > executables =3D [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-seq= uences or https://docs.python.org/2/tutorial/datastructures.html#tuples-and-seque= nces for Python 2. The round parentheses aren't significant. So: >>> def Executable(arg): ... return arg ... >>> executables =3D [Executable("salut.py")], >>> executables (['salut.py'],) >>> Laura =