Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Ben Finney Newsgroups: comp.lang.python Subject: Re: What is a function parameter =[] for? Date: Thu, 19 Nov 2015 13:08:45 +1100 Lines: 26 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de h3U71Anx/rUrTYT+ABP1pwUoo0AY0yJqNpFOfTEdhYsQ== Cancel-Lock: sha1:UPudkOoxryagYzagzy9Lh7lqXa8= Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.030 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'remaining': 0.07; 'governments': 0.09; 'mutable': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'thu,': 0.15; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; '2015': 0.20; 'object.': 0.22; 'appears': 0.23; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.26; 'chris': 0.26; 'point.': 0.27; 'initial': 0.28; 'objects': 0.29; 'certain': 0.31; 'retain': 0.33; 'values.': 0.33; 'equal': 0.34; 'nov': 0.35; 'depends': 0.36; 'to:addr :python-list': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'mean': 0.38; 'does': 0.39; 'to:addr:python.org': 0.40; 'your': 0.60; 'state,': 0.66; 'guaranteed': 0.67; '_o__)': 0.84; 'default?': 0.84; 'received:125': 0.84; 'speech': 0.84; '\xe2\x80\x9cthe': 0.93; 'incorporated': 0.95; 'hand,': 0.97 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: jigong.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) 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:99026 Chris Angelico writes: > On Thu, Nov 19, 2015 at 12:41 PM, BartC wrote: > > On 18/11/2015 23:22, Chris Angelico wrote: > >> On the contrary, it is certain always to be that exact object. > > > > But, not the same value that appears as the default? It depends what you mean by “the same value”. > Nope. Mutable objects are never guaranteed to retain the same values. > That's kinda the point. Well, they are the *same value*, if by “value” you mean “a particular object”. On the other hand, the value can *change* over time, while remaining the same object. So it will not be equal to its initial state, even though it is the same object. -- \ “[F]reedom of speech does not entail freedom to have your ideas | `\ accepted by governments and incorporated into law and policy.” | _o__) —Russell Blackford, 2010-03-06 | Ben Finney