Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail From: Dennis Lee Bieber Newsgroups: comp.lang.python Subject: Re: What is a function parameter =[] for? Date: Tue, 24 Nov 2015 11:27:35 -0500 Organization: IISS Elusive Unicorn Lines: 31 Message-ID: References: <56544BAB.9020709@rece.vub.ac.be> <874mgbpnb5.fsf@elektro.pacujo.net> <486929d1-4caa-403c-89e6-c45d7b447f98@googlegroups.com> <56547DE3.1040009@rece.vub.ac.be> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de F8Fbf9gCuhT7KlAZ51pg7gG+Mal/xTrS1ZbxML8hZaNA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'imply': 0.07; 'means,': 0.07; 'message-id:@4ax.com': 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; 'python.': 0.11; '"value"': 0.16; 'creation.': 0.16; 'instances,': 0.16; 'integers,': 0.16; 'object).': 0.16; 'otoh,': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'url:home': 0.18; '2015': 0.20; 'object.': 0.22; 'parameter': 0.22; 'header:X-Complaints-To:1': 0.26; 'correct': 0.28; 'values': 0.28; 'objects': 0.29; "i'd": 0.31; 'probably': 0.31; 'fixed': 0.31; 'class': 0.33; 'definition': 0.34; 'tue,': 0.34; 'list': 0.34; 'nov': 0.35; 'but': 0.36; 'evaluation': 0.36; 'to:addr :python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'charset:us-ascii': 0.37; 'does': 0.39; 'to:addr:python.org': 0.40; 'default': 0.61; 'to,': 0.63; 'fuel': 0.66; 'state,': 0.66; 'jet': 0.84; 'pardon': 0.84; 'schreef': 0.84; 'dennis': 0.91; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: adsl-108-79-219-161.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES 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:99362 On Tue, 24 Nov 2015 16:10:27 +0100, Antoon Pardon declaimed the following: >Op 24-11-15 om 15:18 schreef Ned Batchelder: > >> 2) In Python, "value" means, what object does a name refer to, or what >> object did an evaluation produce. > >I don't think this is correct because that would imply that objects don't >change values (since the value would be the object). > >When a list is mutated, it's value has changed. That is how the word is >generally used in python. Probably adding jet fuel to the embers but... I'd consider "value" to be the /current state/ of the object A mutable object has changeable internal state, but remains the same object. Integers, floats, strings are fixed with to the state at time of creation. Dictionaries, lists, class instances, OTOH, are not fixed to the state at time of creation. Default parameter link a name to an object at the time of definition but do not "fix" the state of the object. -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/