Path: csiph.com!goblin1!goblin.stu.neva.ru!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.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.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'skip:[ 20': 0.03; 'ignored': 0.05; '(1,': 0.09; 'tuple': 0.09; 'example:': 0.10; 'python': 0.10; 'def': 0.13; 'b):': 0.16; 'comma.': 0.16; 'executables': 0.16; 'ignores': 0.16; 'element': 0.18; 'header:In- Reply-To:1': 0.24; 'least': 0.27; 'message-id:@mail.gmail.com': 0.27; 'function': 0.28; 'print': 0.30; 'definition': 0.34; 'list': 0.34; 'received:google.com': 0.35; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'version': 0.38; 'to:addr:python.org': 0.40; 'some': 0.40; 'your': 0.60; 'vous': 0.61; 'no.': 0.62; 'function)': 0.84; 'subject:location': 0.84; 'url:app': 0.84 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:to :content-type; bh=rwxGVoioVTdzV9hjeGzfIor2NLbvaxKH0ggob1Nv5K0=; b=jIU+md4th302Pr1Nn0o28/MRvyPuZRqBabjOu0p9dqorefb+fdNkPUmYqVCpm07TL6 xNf8ai7+ELL9B25lebRlq4Qy+eBjf7TcGqnCOblYjuMsHcx+qtuobgSIqVL81WMtGyhL VbUAeJl/Mt7L4Z4ajPHnYnzFjVgZbM4Sa3quOZaFQsBAHsIci6wxdneaqYjDmT4PFekt mNUP5RR7kCMfyYPNYO/sJ682fTW5od4GxTKipWiwGJov9UY/QUKs+BrG7UcqPeDeiZGa CihmF/vvXeRrOtmBuJV9oHU/2Augb1l7DDnQAX3kdS9sD4NTVMDipkc9O1Gl9DDlZJZN GeWg== MIME-Version: 1.0 X-Received: by 10.66.136.102 with SMTP id pz6mr68154368pab.52.1441284654548; Thu, 03 Sep 2015 05:50:54 -0700 (PDT) In-Reply-To: References: <55e83afb$0$3157$426a74cc@news.free.fr> <55e83ce3$0$3327$426a74cc@news.free.fr> Date: Thu, 3 Sep 2015 08:50:54 -0400 Subject: Fwd: Strange location for a comma From: Vladimir Ignatov To: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 54 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1441284664 news.xs4all.nl 23724 [2001:888:2000:d::a6]:42433 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95929 >> >> # On appelle la fonction setup >> setup( >> name = "salut", >> version = "0.1", >> description = "Ce programme vous dit bonjour", >> executables = [Executable("salut.py")], # <--- HERE >> ) >> >> > > Ok its understood, it's a 1 element only tuple > > example: > >>>> A = 5, >>>> A > > (5,) > >>>> A = (6) >>>> A > > 6 No. It's not a tuple in your case (calling 'setup' function) a = 1,2, # <- extra comma print a b = 1, # <- extra comma print b => (1, 2) # ignored (1,) # made tuple and def f(a, b): print a,b f(1,2,) # <- extra comma => 1 2 # ignored Under some circumstances python ignores "excess" comma. At least inside list definition [1,2,3,] and function calls f(1,2,) Vladimir http://itunes.apple.com/us/app/python-code-samples/id1025613117