Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'python,': 0.02; 'languages,': 0.04; 'subject:Python': 0.05; 'modify': 0.05; 'creator': 0.09; 'cc:addr:python-list': 0.10; 'caring': 0.16; 'tend': 0.17; 'creates': 0.18; 'received:209.85.214.174': 0.21; 'operations.': 0.22; 'cc:2**0': 0.23; 'example': 0.23; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'topic': 0.27; 'object,': 0.27; 'message-id:@mail.gmail.com': 0.27; "doesn't": 0.28; "i'm": 0.29; 'maybe': 0.29; 'impression': 0.33; 'safely': 0.33; 'operations': 0.33; 'that,': 0.34; 'received:google.com': 0.34; 'received:209.85': 0.35; 'there': 0.35; 'but': 0.36; 'functional': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'things': 0.38; 'talk': 0.38; 'sure': 0.38; 'received:209.85.214': 0.39; 'header:Received:5': 0.40; 'first': 0.61; 'more': 0.63; 'great': 0.64; 'andrea': 0.84; 'compose': 0.84; 'worth,': 0.84 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:to :cc:content-type; bh=PvCx038UEKH15rSb/g7pILkQomvPIMwDWIVrCcGgZUQ=; b=UPbanTL7HSJDTgL5qZ4HaZGkSC9UT2UfoXmSD1a9poXXhRWwL5qTKImAMGuI7TauUY tHyy9YIgddelu3PO5as+UsKCPHvENUEPjmwUF7u2DeP77WHAyPRXGJ3j71OGSQDBBBy8 SbU61+kAqrWOdO0BzWxWOHCwkoKFZGhA/9iTFy0ctCIz5j2im6RhEyd12XNtNacoGCbq Fqhlrw3WR3qugz6XJQN80lrFaB7u2U9tqoTaQjPeZ+xblBzk0a+lzxZGDPU/rOzvg419 Zy9QBxCKzB4eBGK1ysovUmTIvgf9lyK5iCCZrGmU3SuhAD8YCanu/Whu/CSL5Xm2hORX 8TLw== MIME-Version: 1.0 In-Reply-To: References: <771101937.3475467.1351525139677.JavaMail.root@sequans.com> Date: Mon, 29 Oct 2012 15:48:09 +0000 Subject: Re: Immutability and Python From: andrea crotti To: Jean-Michel Pichavant Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1351525692 news.xs4all.nl 6975 [2001:888:2000:d::a6]:41096 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:32386 2012/10/29 andrea crotti : >> > > Well sure but it doesn't modify the first object, just creates a new > one. There are in general good reasons to do that, for example I can > then compose things nicely: > > num.increment().increment() > > or I can parallelize operations safely not caring about the order of > operations. > > But while I do this all the time with more functional languages, I > don't tend to do exactly the same in Python, because I have the > impression that is not worth, but maybe I'm wrong.. By the way on this topic there is a great talk by the creator of Clojure: http://www.infoq.com/presentations/Value-Values