Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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.087 X-Spam-Evidence: '*H*': 0.83; '*S*': 0.01; 'argument': 0.05; 'mrab': 0.05; '21,': 0.07; 'args)': 0.09; 'python': 0.11; 'sheer': 0.16; 'language': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'mention': 0.26; 'skip:" 20': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'designer': 0.30; 'message-id:@mail.gmail.com': 0.30; '+0100,': 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:google.com': 0.35; 'himself': 0.36; 'expected': 0.38; 'somebody': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'worry': 0.60; 'details.': 0.61; 'skip:* 10': 0.61; "you've": 0.63; 'such': 0.63; 'determine': 0.67; 'hardly': 0.84; 'subject:Value': 0.84; 'genius': 0.91; 'rick': 0.93; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=eRjYjT3imEVoMF4+r9z8SfMvZnVMi2/oEEumhTyAgRM=; b=y+szFqhCqrlycM0bZaMUBOXJC6PXdymJYhBSyQfxZpdS7ApDUK3Ek1uym13Mi0uj1p GYI6lWN6JU0ouUlLly+tGI3f/KKfDqzLGG2mshLNyVW24g9S86AotaINXrPb6HfLPTZz yZ9Cg+oUKngUf5QcY3MiDXLKQJk5GLLeAGpxoi7UmKE0FGcfxKwAQ5Swl1B7e8OmDFE6 +VcUVG1p7MVlxa7uIHJvlhIBcGEZth7HNcsRl64lsmRFzzNvA5dYUQJ4ihvi59H0D+qU Hy/Q9OtxjzxdEtnha7+WSQ5gZk/BoJKFte4ykOtek2kP9i2pSPkja8U0QAfVP31J5k7y 3B3A== X-Received: by 10.68.189.199 with SMTP id gk7mr4142424pbc.208.1371864502696; Fri, 21 Jun 2013 18:28:22 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <51c4fab1$0$29999$c3e8da3$5496439d@news.astraweb.com> 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> From: Ian Kelly Date: Fri, 21 Jun 2013 19:27:42 -0600 Subject: Re: Default Value To: Python Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list 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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371864512 news.xs4all.nl 15901 [2001:888:2000:d::a6]:32784 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:48897 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.