Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news.snarked.org!newsfeed.news.ucla.edu!usenet.stanford.edu!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: Default Value Date: Mon, 24 Jun 2013 14:22:23 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 31 Message-ID: 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> NNTP-Posting-Host: dsl.comtrol.com X-Trace: reader2.panix.com 1372083743 6753 64.122.56.22 (24 Jun 2013 14:22:23 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Mon, 24 Jun 2013 14:22:23 +0000 (UTC) User-Agent: slrn/1.0.1 (Linux) Xref: csiph.com comp.lang.python:49049 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... -- Grant Edwards grant.b.edwards Yow! I'm continually AMAZED at at th'breathtaking effects gmail.com of WIND EROSION!!