Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail From: Ian Kelly Newsgroups: comp.lang.python Subject: Re: What is a function parameter =[] for? Date: Thu, 19 Nov 2015 12:25:21 -0700 Lines: 8 Message-ID: References: <564dbe6b$0$1610$c3e8da3$5496439d@news.astraweb.com> <564df258$0$1604$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de cf9w+uePEA0gY1ArEf6QyAB/jkjCSDhg1dTSMMrZiUrg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.052 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'received:209.85.223': 0.03; "ain't": 0.09; 'argument': 0.15; 'thu,': 0.15; 'received:io': 0.16; 'received:psf.io': 0.16; 'scope.': 0.16; 'wrote:': 0.16; '2015': 0.20; 'saying': 0.22; 'header:In-Reply- To:1': 0.24; 'chris': 0.26; 'message-id:@mail.gmail.com': 0.27; 'function': 0.28; 'received:google.com': 0.35; 'nov': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'stuff': 0.38; 'mean': 0.38; 'to:addr:python.org': 0.40; 'default': 0.61; 'is.': 0.63; 'therefore': 0.67; '"simply': 0.84; 'shouting,': 0.84; 'to:name:python': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=KasmLHPUa67VM6tL2cHnP3+Xt/3MVDw6gtWKggaMdXw=; b=m+Vii7T3MjeSzsS5hCsZOWYpkG523ZBz58yXje3Z86G7bpBuEEXQImFpaFwEe0xIsY rYOTrKyPD7D76H9IZU2DwKh89hxuUpPTdL1ii6AUg4gz4QymRpZ+Pl4O6ooWD1rHiN3w vx5falMSofBnaEFLsy2ZgeIhkeqDpPCpH0H7BwyTAKZgXWHrY7mluM8Brert7KpC04DI NC4D/PUeQFMy9Tq7C8OomFzGIqkptRRXADvBZ1ZF2w1kQGDQ7PRV/sQJHRineC4PlVhM 6q98bYGSH3FMdgB5dn3EXp2YcX0SePOOMDFqQ9ipKqgVHNKnRYjues5NwydE11cWjfhL eIRw== X-Received: by 10.107.164.154 with SMTP id d26mr10113440ioj.111.1447961161220; Thu, 19 Nov 2015 11:26:01 -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:99087 On Thu, Nov 19, 2015 at 12:19 PM, Chris Angelico wrote: > But you're > saying that it "simply substitute[s] the expression", which would mean > that "func()" is exactly the same as "func(y)". A function default > argument is therefore able to STEAL STUFF FROM THE CALLER'S SCOPE. > Sorry for shouting, but if that ain't bizarre, I don't know what is. It's like pass-by-name, but in reverse.