Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.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.025 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'subject:Python': 0.05; 'python': 0.09; 'immutable': 0.09; 'bind': 0.16; 'immutability': 0.16; 'oct': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'variable': 0.20; 'python?': 0.20; 'received:209.85.216.46': 0.21; 'programming': 0.23; 'paul': 0.24; 'header:In-Reply-To:1': 0.25; 'message- id:@mail.gmail.com': 0.27; 'once.': 0.29; 'writes:': 0.29; 'no,': 0.29; 'classes': 0.30; 'instances': 0.33; 'to:addr:python-list': 0.33; 'presence': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'really': 0.36; 'received:209': 0.37; 'received:209.85.216': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'nothing': 0.38; 'to:addr:python.org': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'more': 0.63; 'lack': 0.71; 'andrea': 0.84; 'doi': 0.84 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=nPrglwPCCqRZUhuy4+x9h0JaLJnTLbcBVQ1vd392yKY=; b=kZuQAmCDp2L0vD80YDs0sZwZlLbVsbnEHWX4pl23stMAXinLPB9aISn0zJ2elWjwhL IfkEK/MrK3mS8Db2eebMkHtqpGdVCDJa0aSxr72UcHIGWbC6YNQu6OGpwYV+xdjPZktp mN0tJIcpVmpJovAameeArLxJVgZNIghGhKYzpgipW1/t+NBicPFujVwuZrh1hKaEW9nF ZcnrxpCdaj2zY069JBt0gUIyjfbqieSJUMpO8F4T2u62EQxIfxzgYm25QGw3NyviP1Oe pb2qET0EnFupNlgu0IYMkN4TbtfLVXgKe/mmZZNaUw/nqmYvbTxo9w+e/NkX3/VitdyE 1vTQ== MIME-Version: 1.0 In-Reply-To: <7x625t6xaj.fsf@ruckus.brouhaha.com> References: <1793477354.3492917.1351526431192.JavaMail.root@sequans.com> <7x625t6xaj.fsf@ruckus.brouhaha.com> From: Devin Jeanpierre Date: Mon, 29 Oct 2012 14:25:51 -0400 Subject: Re: Immutability and Python To: 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: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1351535200 news.xs4all.nl 6858 [2001:888:2000:d::a6]:45607 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:32415 On Mon, Oct 29, 2012 at 12:46 PM, Paul Rubin wrote: > andrea crotti writes: >> Also because how doi I make an immutable object in pure Python? > > Numbers in Python are already immutable. What you're really looking for > is a programming style where you don't bind any variable more than once. No, they were looking for a way to create classes whose instances are immutable. Also, immutability has nothing to do with the presence or lack of for loops. -- Devin