Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: What is a function parameter =[] for? Date: Wed, 25 Nov 2015 02:48:32 +1100 Lines: 17 Message-ID: References: <564dbe6b$0$1610$c3e8da3$5496439d@news.astraweb.com> <564df258$0$1604$c3e8da3$5496439d@news.astraweb.com> <8601c9af-a7d9-4642-ba1c-8edd1e4c3390@googlegroups.com> <56546985.8060704@rece.vub.ac.be> <56547337.4000709@rece.vub.ac.be> <56547C53.8030407@rece.vub.ac.be> <5654864E.2070906@rece.vub.ac.be> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de VKkjZmmhkQsdqV0kFJfuGAMC5MfdrVsmJ3FX5wojdSVQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'received:209.85.223': 0.03; 'expressions': 0.07; 'cc:addr:python-list': 0.09; 'literal': 0.09; 'wed,': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'literal.': 0.16; 'literals': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'recognizable': 0.16; 'wrote:': 0.16; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'either.': 0.22; 'am,': 0.23; 'header :In-Reply-To:1': 0.24; "doesn't": 0.26; 'message- id:@mail.gmail.com': 0.27; 'looks': 0.29; 'point': 0.33; 'similar': 0.33; 'list': 0.34; 'received:google.com': 0.35; 'nov': 0.35; "isn't": 0.35; 'received:209.85': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'being': 0.37; 'say': 0.37; 'received:209': 0.38; 'sure': 0.39; 'easily': 0.39; 'your': 0.60; 'more': 0.63; 'beside': 0.84; 'chrisa': 0.84; 'pardon': 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 :content-type; bh=370lS8/oJ2XoSV0g6wo7S0v6/m9vu4CvZoDEi7WQQsc=; b=IgOMPoVynjI3Ql/KxKryQxMVaPu9DWvRjLyhAknVZGIn8p8AsKipLgJJNL7Xr1IyyC zX/GkFvbmquN2wWeTEmj3TZe0A5NVsAD/UaGD2MA04XYzE80BN8zwJUyJUH7igeEJDq4 xuhD3eVWw4cXcPhMy9DXQ3DnmrzD+9E62C4xynOSk0rnJVWHYQiHpeIjj6SDnvwOE+pz vlEuITupqyct+Vw2rvUScv6yDV4Mhi/kasOp06slyJfqGkSxdbPUuoJEsEDDHo2+io2m x4QC7swhUDILQgZZu2nHxpuVGY6UYIkpw/RSx+neqpe8jcJ2YjOAl7wRe36dRdCEl+Jr L3RQ== X-Received: by 10.107.3.163 with SMTP id e35mr28300671ioi.157.1448380112241; Tue, 24 Nov 2015 07:48:32 -0800 (PST) In-Reply-To: <5654864E.2070906@rece.vub.ac.be> 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: , Xref: csiph.com comp.lang.python:99360 On Wed, Nov 25, 2015 at 2:46 AM, Antoon Pardon wrote: > What is your point? I say that [] looks like a literal. Because it > sure resembles () which is a literal. > > That [] in fact isn't a literal doesn't contradict it looks like > one. > > That you can come up with more complicated list expressions that > are more easily recognizable as not being literals is beside the > point because we have generator expressions that look similar to > those list comprehensions and those generator expressions don't > contradict that () is a literal. () is not a literal either. ChrisA