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: Thu, 26 Nov 2015 13:25:24 +1100 Lines: 24 Message-ID: References: <56547337.4000709@rece.vub.ac.be> <56547C53.8030407@rece.vub.ac.be> <5654864E.2070906@rece.vub.ac.be> <56549324.8020607@rece.vub.ac.be> <56549F15.40206@rece.vub.ac.be> <5654B037.6020107@rece.vub.ac.be> <56550273$0$1585$c3e8da3$5496439d@news.astraweb.com> <5655f27b$0$1614$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de dm5/R5TOknnwoLAbAgFXsAIZJNB1Tumd83THyvlN3ZEQ== 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; 'received:209.85.223': 0.03; 'cc:addr:python-list': 0.09; 'python': 0.10; 'thu,': 0.15; '(oracle': 0.16; '1:08': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'nonetheless': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'tuple,': 0.16; 'wrote:': 0.16; "wouldn't": 0.16; '>>>': 0.20; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; '64-bit': 0.22; 'gcc': 0.22; 'dec': 0.23; 'header:In-Reply-To:1': 0.24; 'message- id:@mail.gmail.com': 0.27; 'alan': 0.29; 'server': 0.34; 'received:google.com': 0.35; 'false': 0.35; 'nov': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'more': 0.63; '26,': 0.72; '2.5.3': 0.84; '2.7.8': 0.84; 'chrisa': 0.84; 'to:none': 0.91; '2014,': 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=6iUMD8rTikYjj8CC1ih48z79COKVsPEX2kxLI+YzsZI=; b=qZ8CE7Ak++JBERcqBTdppBexW5a6C/Ol41EMpWkOwXMSctAv0sUYqG5pmv5QCbyY9t RPZB9bxnnCNRfdmQPs38tp2hWUutLqO68v+Akt4OjMOr5okfAIMA1puIR+fLSQtuCDwF TnOTUzVFwSiBkrJSi2NMw8CSTwz8dnkMRDkWWjcFaQFJL8rMFmnNIJlGSg/meAnGrehq oW0wKjNs0Urucyngoev0GGpuybivtsfAcVSPUC2gyJoXKsW0iGMyfMw0Pv3rY28diC8g GnR2PQBNnU32b16mBlHDpEdlig2XQgMYXHfT7AEm70/8HfSzvnCsF0qZH+eHpuwsKrqg jtTg== X-Received: by 10.107.10.233 with SMTP id 102mr37788226iok.31.1448504724631; Wed, 25 Nov 2015 18:25:24 -0800 (PST) In-Reply-To: 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:99522 On Thu, Nov 26, 2015 at 1:08 PM, Alan Bawden wrote: > (Note that nothing in the documentation I can find actually _guarantees_ > that a Python implementation will only have one unique empty tuple, but > I wouldn't be suprised if the following is nonetheless true in all > current implementations: > > >>> tuple([]) is tuple([]) > True > > ) Jython 2.5.3 (, Oct 8 2014, 03:39:09) [OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.7.0_85 Type "help", "copyright", "credits" or "license" for more information. >>> tuple([]) is tuple([]) False Python 2.7.8 (2.4.0+dfsg-3, Dec 20 2014, 13:30:46) [PyPy 2.4.0 with GCC 4.9.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>> tuple([]) is tuple([]) False ChrisA