Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Dennis Lee Bieber Newsgroups: comp.lang.python Subject: Re: Late-binding of function defaults (was Re: What is a function parameter =[] for?) Date: Wed, 25 Nov 2015 13:32:46 -0500 Organization: IISS Elusive Unicorn Lines: 23 Message-ID: References: <87d1v5emhl.fsf@elektro.pacujo.net> <564e6a62$0$1620$c3e8da3$5496439d@news.astraweb.com> <56556DF8.1080407@rece.vub.ac.be> <878u5mns8z.fsf@elektro.pacujo.net> <874mganq2q.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de vCN3D1PcYFe1FY0tUf9wTwtI25Gc1HpMSAvkeqOGt66Q== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'immutable': 0.09; 'message-id:@4ax.com': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'tuple': 0.09; 'tuple.': 0.09; 'python': 0.10; 'wed,': 0.15; '>on': 0.16; 'parts,': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'subject:?)': 0.16; 'tuple,': 0.16; 'wrote:': 0.16; "wouldn't": 0.16; 'url:home': 0.18; 'changes': 0.20; '2015': 0.20; 'keys': 0.22; 'tuples': 0.22; 'component': 0.23; 'dependent': 0.23; 'needed.': 0.23; 'header:X-Complaints-To:1': 0.26; 'sense': 0.26; 'relational': 0.29; 'types.': 0.29; 'related': 0.32; 'ordered': 0.33; 'lists': 0.34; 'could': 0.35; 'nov': 0.35; 'to:addr:python- list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'charset :us-ascii': 0.37; 'associated': 0.38; 'subject:-': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'collection': 0.60; 'close': 0.61; 'different': 0.63; 'dennis': 0.91 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:99475 On Wed, 25 Nov 2015 14:34:12 +0000, BartC declaimed the following: >On 25/11/2015 13:53, Marko Rauhamaa wrote: >Now try explaining again to me how you would use tuples for the same >thing... You wouldn't -- you would decompose the tuple and create a new one from the parts, with changes as needed. And as hinted, tuples were immutable in Python so they could be used as keys in dictionaries. The associated concept then also makes sense -- lists commonly holding multiple independent entities of the same type vs an ordered collection of dependent entities of different types. And tuple, as used by Python, is a close match to tuple as used by relational theory -- everything in the tuple is related in some way. If one is to make a change to a component of a relational tuple, it is no longer the same tuple. -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/