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.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'explicitly': 0.04; 'practice,': 0.07; 'python': 0.09; 'cc:addr:python-list': 0.10; 'programmer': 0.11; 'yet.': 0.13; 'sat,': 0.15; 'agree.': 0.16; 'guessing': 0.16; 'mutated': 0.16; 'wrote:': 0.17; 'feb': 0.19; 'cc:2**0': 0.23; 'this:': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'object,': 0.27; 'message-id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'correct': 0.28; 'chris': 0.28; 'unified': 0.29; 'point': 0.31; 'johnson': 0.32; 'that,': 0.34; 'agree': 0.34; 'received:google.com': 0.34; 'requiring': 0.35; 'pm,': 0.35; 'there': 0.35; 'method': 0.36; 'should': 0.36; 'one,': 0.37; 'far': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'object': 0.38; 'apply': 0.39; 'think': 0.40; 'easy': 0.60; 'further': 0.61; 'making': 0.64; '2013': 0.84; 'rick': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=EViQlqrIxr/E5FmaUwIcVGbihXmgz55Gorj4md1RfPQ=; b=NfQ9I7JRefl9QiXIK/nmGUUudqv9EJvJ1WoE/Nba58try2SvBSvOVN47iw7DOa3ZrW aACecCDsqRlzzCxhGr9eGsQK3qt5oXlVwqJb4bVI+agBkjezr9LU7Y4GHxvupuH7fWJL J1cJFL1IjJ44HfIHX/5vomRLiSUmih2pPpMKkGkIdpAHC6AKjWKCADB100V13IVQPqCl jrAFpG4ehYz1xYeOJCYtgXMUM07p3y+y8LxDjzadLCnc4HFIPUxU5VoDw9bn9AtytTxs yzsYSi3bpJim92QjLNz3qVyPJp4/0NGzutG5QuwWn1nfXiOntam5P2nB1SjdH2jqrjN1 gTJw== MIME-Version: 1.0 X-Received: by 10.180.104.196 with SMTP id gg4mr9773940wib.16.1360472022673; Sat, 09 Feb 2013 20:53:42 -0800 (PST) In-Reply-To: References: <680e50a4-6569-49cf-b369-0be450545d50@googlegroups.com> <5115c455$0$6574$c3e8da3$5496439d@news.astraweb.com> Date: Sat, 9 Feb 2013 20:53:42 -0800 Subject: Re: LangWart: Method congestion from mutate multiplicty From: Mark Janssen To: Chris Angelico Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org 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: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1360472029 news.xs4all.nl 6882 [2001:888:2000:d::a6]:53451 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:38554 On Sat, Feb 9, 2013 at 8:20 PM, Chris Angelico wrote: > On Sun, Feb 10, 2013 at 2:54 PM, Rick Johnson > wrote: >> My point was this: All mutate methods should mutate "in-place", if the programmer wishes to create a mutated copy of the object, then the programmer should /explicitly/ create a copy of the object and then apply the correct mutator method to the copy. > > I agree. And we can go further and declare that there is only one data > [sarcasm] I have to agree with Rick, I think requiring the user to explicitly create a new object, which is already a good and widely-used practice, should be the Only One Way to Do It. Guessing method names is far suboptimal to this simple, easy idiom. As for the point Chris was making as to making all types one, I actually agree there too, it's just that in order to do that, python would need a unified object model and it doesn't have one yet. Mark