Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.roellig-ltd.de!open-news-network.org!cyclone03.ams2.highwinds-media.com!news.highwinds-media.com!voer-me.highwinds-media.com!hq-usenetpeers.eweka.nl!hq-usenetpeers.eweka.nl!bcyclone05.am1.xlned.com!bcyclone05.am1.xlned.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'indicates': 0.09; 'subject:set': 0.09; 'cc:addr:python-list': 0.11; 'behaviour.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'mutable': 0.16; 'semantics': 0.16; 'subject:default': 0.16; 'subject:parameters': 0.16; 'subject:their': 0.16; 'subject:values': 0.16; 'so.': 0.16; 'wrote:': 0.18; "python's": 0.19; 'thu,': 0.19; 'cc:addr:python.org': 0.22; 'aspect': 0.24; 'question': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; 'gcc': 0.31; 'objects': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'pm,': 0.38; 'different': 0.65; 'funny': 0.74; 'behavior': 0.77; 'subject:get': 0.81; '1:18': 0.91; 'crucial': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=69Q5JihZaoNPR/jVDwPMnpPId/XSZuA++ZELRlrKv7g=; b=wAiDFACZdYKKtBsxuWOwrjuOLgGgTSsgg4CSfB0tJpYCFgWopc+DvFeXQC0AL+j2P9 VuywfT72L09u4YdNBlJ8wtO2QeoE4Du5ANunJszupBON0Bbm04AWRbkrhHuk9vu5fQd6 vScaAzuHQep9hO5Fh9NzpwML+nnujdv67FKNDkC7WIZfhd/LowH9dgWkNLLI+bwtb60m u3x+tazRzHCtOCamFJ97zUxiUc7L18v8xNL/eYGlEK4mSGRUNw11HL0PPXK+C1Kmlnsd r15MzzxZnlU0Uq+4xRg/1jGPSLtvgXldPCY6BfEyEV506RQSJrkTxIFGOiwlBAjLHKuo dCvQ== MIME-Version: 1.0 X-Received: by 10.50.61.140 with SMTP id p12mr11491249igr.34.1418264645993; Wed, 10 Dec 2014 18:24:05 -0800 (PST) In-Reply-To: References: <54866F2E.1765.complang@piz.noip.com> <54866F2E.1768.complang@piz.noip.com> Date: Thu, 11 Dec 2014 13:24:05 +1100 Subject: Re: When do default parameters get their values set? From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1418264648 news.xs4all.nl 2840 [2001:888:2000:d::a6]:55225 X-Complaints-To: abuse@xs4all.nl X-Received-Body-CRC: 835066016 X-Received-Bytes: 4093 Xref: csiph.com comp.lang.python:82322 On Thu, Dec 11, 2014 at 1:18 PM, Rustom Mody wrote: > But I have a different question -- can this be demonstrated without the 'is'? > Because to me 'is' -- equivalently id -- is a code-smell and is like > explaining funny behavior by showing the dis -- like > $ gcc -S ... > -- output. > > It can always explain, but indicates that the semantics is not (sufficiently) abstract in this aspect Not so. Object identity is a fundamental part of Python. Indistinguishable-but-distinct mutable objects are crucial to Python's behaviour. ChrisA