Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.043 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'subject:: [': 0.04; 'argument': 0.05; 'mrab': 0.05; '21,': 0.07; 'args)': 0.09; 'python': 0.11; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'message- id:@mrabarnett.plus.com': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'sheer': 0.16; ':-)': 0.16; 'language': 0.16; 'wrote:': 0.18; 'subject:] ': 0.20; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'mention': 0.26; 'skip:" 20': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'designer': 0.30; '+0100,': 0.31; '>>>>': 0.31; "d'aprano": 0.31; 'omitted': 0.31; 'steven': 0.31; 'terminate': 0.31; 'trivial': 0.31; "we're": 0.32; 'fri,': 0.33; 'johnson': 0.35; 'received:84': 0.35; 'himself': 0.36; 'surely': 0.36; 'should': 0.36; 'expected': 0.38; 'somebody': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'anything': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'ian': 0.60; 'worry': 0.60; 'details.': 0.61; 'skip:* 10': 0.61; "you've": 0.63; 'such': 0.63; 'determine': 0.67; 'header:Reply- To:1': 0.67; 'reply-to:no real name:2**0': 0.71; 'hardly': 0.84; 'reply-to:addr:python.org': 0.84; 'subject:Value': 0.84; 'edwards': 0.91; 'genius': 0.91; 'subject:SPAM': 0.91; 'rick': 0.93; '2013': 0.98 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=RZapVTdv c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=0Bzu9jTXAAAA:8 a=oyR3mlnJdzkA:10 a=ihvODaAuJD4A:10 a=OUOv7kDek9cA:10 a=8nJEP1OIZ-IA:10 a=EBOSESyhAAAA:8 a=8AHkEIZyAAAA:8 a=TphZnsjS3NQA:10 a=pGLkceISAAAA:8 a=kZ7UWmmPAAAA:8 a=rcN1enOpSDkqssOy4NEA:9 a=wPNLvfGTeEIA:10 a=MSl-tDqOz04A:10 a=pyH5b1fOeEsA:10 X-AUTH: mrabarnett:2500 Date: Mon, 24 Jun 2013 16:22:54 +0100 From: MRAB User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: python-list@python.org Subject: Re: [SPAM] Re: Default Value References: <7e6361d5-6619-4aaa-adda-8b5f01bde57f@googlegroups.com> <447dd1c6-1bb2-4276-a109-78d7a067b442@d8g2000pbe.googlegroups.com> <2e92b4c7-31be-40d2-a906-ab19f3630dfa@googlegroups.com> <51c477dd$0$29999$c3e8da3$5496439d@news.astraweb.com> <565a1c8f-6fd9-4bab-9834-076eaea527f8@googlegroups.com> <7e1ed740-df18-4978-b11d-8ca9c4b5bd04@googlegroups.com> <03e9544e-9d6d-4155-a793-56f0c22c7f7a@googlegroups.com> <51c4fab1$0$29999$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: python-list@python.org List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372087376 news.xs4all.nl 15963 [2001:888:2000:d::a6]:45627 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49053 On 24/06/2013 15:22, Grant Edwards wrote: > On 2013-06-22, Ian Kelly wrote: >> On Fri, Jun 21, 2013 at 7:15 PM, Steven D'Aprano >> wrote: >>> On Fri, 21 Jun 2013 23:49:51 +0100, MRAB wrote: >>> >>>> On 21/06/2013 21:44, Rick Johnson wrote: >>> [...] >>>>> Which in Python would be the "MutableArgumentWarning". >>>>> >>>>> *school-bell* >>>>> >>>> I notice that you've omitted any mention of how you'd know that the >>>> argument was mutable. >>> >>> That's easy. Just call ismutable(arg). The implementation of ismutable is >>> just an implementation detail, somebody else can work that out. A >>> language designer of the sheer genius of Rick can hardly be expected to >>> worry himself about such trivial details. >> >> While we're at it, I would like to petition for a function >> terminates(f, args) that I can use to determine whether a function >> will terminate before I actually call it. > > I think it should be terminate_time() -- so you can also find out how > long it's going to run. It can return None if it's not going to > terminate... > Surely that should be float("inf")! Anything else would be ridiculous! :-)