Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Mark Lawrence Newsgroups: comp.lang.python Subject: Re: What is a function parameter =[] for? Date: Mon, 23 Nov 2015 11:32:47 +0000 Lines: 42 Message-ID: References: <564dbe6b$0$1610$c3e8da3$5496439d@news.astraweb.com> <564df258$0$1604$c3e8da3$5496439d@news.astraweb.com> <564e71f6$0$1619$c3e8da3$5496439d@news.astraweb.com> <565139f0$0$1598$c3e8da3$5496439d@news.astraweb.com> <5652535a$0$1596$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de S3aHqJDMp+Bqy58DKJDI/gXCHtjK7sEH+9w7depQzzXw== 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; 'static': 0.03; 'value,': 0.03; 'true,': 0.04; 'from:addr:yahoo.co.uk': 0.05; 'puts': 0.07; '"but': 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; "'it'": 0.16; 'better:': 0.16; 'chap': 0.16; 'gregory': 0.16; 'mean,': 0.16; 'mechanism.': 0.16; 'received:194.126': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'wow,': 0.16; 'wrote:': 0.16; 'language': 0.19; '>>>': 0.20; '2015': 0.20; 'machine': 0.21; 'lawrence': 0.22; 'simpler': 0.22; 'am,': 0.23; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'header:User-Agent:1': 0.26; 'example': 0.26; 'header:X-Complaints-To:1': 0.26; '"please': 0.29; 'storage,': 0.29; "i'm": 0.30; 'expensive': 0.32; 'language.': 0.32; "d'aprano": 0.33; 'steven': 0.33; "i'll": 0.33; 'done': 0.35; 'feed': 0.35; 'functions.': 0.35; 'happened': 0.35; 'nov': 0.35; "isn't": 0.35; 'but': 0.36; 'there': 0.36; 'basic': 0.36; 'to:addr :python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'being': 0.37; 'received:org': 0.37; 'why': 0.39; 'to:addr:python.org': 0.40; 'mark': 0.40; 'default': 0.61; 'received:194': 0.61; 'here.': 0.62; 'charset:windows-1252': 0.62; 'more': 0.63; 'different': 0.63; 'our': 0.64; 'cooking,': 0.84; 'god.': 0.84; 'pythonistas,': 0.84; 'shared,': 0.84; 'washing': 0.84; 'technique': 0.93 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: 107.93.126.194.pool.dsl.daisyplc.net User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 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:99264 On 23/11/2015 00:37, BartC wrote: > On 23/11/2015 00:04, Mark Lawrence wrote: >> On 22/11/2015 23:44, Steven D'Aprano wrote: >>> On Mon, 23 Nov 2015 12:21 am, BartC wrote: >>> >>>> But if it's used for static storage, then why not just use static >>>> storage? That's a simpler and more general concept than memoisation. >>> >>> /head-desk >>> >>> "But if it's used for cooking, why not just cook? That's a simpler and >>> more >>> general concept than roasting." > > With 'it' being a washing machine perhaps? But I'll let this other chap > have the last word as he puts it across better: > > > Steven D'Aprano wrote: > >> Memoisation isn't "esoteric", it is a simple, basic and widely-used > >> technique used to improve performance of otherwise expensive functions. > > On 22/11/2015 23:43, Gregory Ewing wrote: > > > That may be true, but I don't think it's a good example > > of a use for a shared, mutable default value, because > > it's arguably an *abuse* of the default value mechanism. > >> What happened to "Please do not feed the trolls"? > > You mean, people with different opinions? > > I think I'm done here. > Wow, so there is a God. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence