Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #32403

Re: Immutability and Python

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <andrea.crotti.0@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.020
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'subject:Python': 0.05; 'python': 0.09; 'immutable': 0.09; 'cc:addr:python-list': 0.10; 'anyway': 0.11; 'extensions': 0.13; '(online': 0.16; 'already,': 0.16; 'beginning.': 0.16; 'bind': 0.16; 'rise': 0.16; 'variable': 0.20; 'python?': 0.20; 'trying': 0.21; 'meant': 0.21; 'cc:2**0': 0.23; 'programming': 0.23; 'cc:no real name:2**0': 0.24; 'paul': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'guess': 0.27; 'message-id:@mail.gmail.com': 0.27; 'once.': 0.29; 'writes:': 0.29; 'url:mailman': 0.29; 'classes': 0.30; 'url:python': 0.32; 'could': 0.32; 'url:listinfo': 0.32; 'certain': 0.33; 'languages': 0.33; 'received:google.com': 0.34; 'received:209.85': 0.35; 'really': 0.36; 'but': 0.36; 'url:org': 0.36; 'useful': 0.36; 'possible': 0.37; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'some': 0.38; 'gives': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'url:mail': 0.40; 'evaluate': 0.62; 'techniques': 0.63; 'more': 0.63; 'andrea': 0.84; 'doi': 0.84; 'well..': 0.84; 'approach.': 0.91; 'to:none': 0.93
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=SzM78xTzxqB42c54TgbcbQE+sEY4TvWCrI28CMtLHu0=; b=AL7TPhQOnvWm4NJlm4PpImcd8zuAAeOeBGMSTL0XQc1fjncVUrP7+XdlspdlkD+kdG yGnbtMQrpwX/7DndvMIe0eCWFnYlKbD+XiDX8658lJWf+p/CSmyL8HUrKkElMlQShiCW AsB+35YBA0+SRRFvVOjLgwSFBdoJBh14OAFvSD97Yeo3zABJ+vhWIgZV5RzDtxz4Fv/E n6aqW47QZDH1ltejaa9jvOFcU7wHYTzMqdLn2qIvRZZtKpzVNn38zS+hvzUT7hgSYUCX 860c9jwvXEsl5Dc6mn0+8nfhD/Ph0ICjk0XZoZA8QnaEn86+2sffMkHJVnI8OrSLeSO2 pyfQ==
MIME-Version 1.0
In-Reply-To <7x625t6xaj.fsf@ruckus.brouhaha.com>
References <CAF_E5Jbf0KJjDLV0jS-p_J9E4D8=_sPScgE+vkmkN2sMw=3aoA@mail.gmail.com> <1793477354.3492917.1351526431192.JavaMail.root@sequans.com> <mailman.3025.1351527152.27098.python-list@python.org> <7x625t6xaj.fsf@ruckus.brouhaha.com>
Date Mon, 29 Oct 2012 17:05:07 +0000
Subject Re: Immutability and Python
From andrea crotti <andrea.crotti.0@gmail.com>
Cc python-list@python.org
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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3031.1351530311.27098.python-list@python.org> (permalink)
Lines 23
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1351530311 news.xs4all.nl 6922 [2001:888:2000:d::a6]:51800
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:32403

Show key headers only | View raw


2012/10/29 Paul Rubin <no.email@nospam.invalid>:
> andrea crotti <andrea.crotti.0@gmail.com> 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.
>
> This gives rise to a programming style that Python can support to a
> certain extent, but for which some other languages are designed from the
> beginning.
>
> You might look at http://learnyouahaskell.com (online book) if you want
> to try the above approach.
> --
> http://mail.python.org/mailman/listinfo/python-list


I meant how do I create new immutables classes myself, I guess that's
possible writing C extensions but I don't see in pure Python..

Anyway I know haskell already, and that's one of the reasons why I was
trying to evaluate if the same techniques could be useful in Python as
well..

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Immutability and Python andrea crotti <andrea.crotti.0@gmail.com> - 2012-10-29 16:12 +0000
  Re: Immutability and Python Paul Rubin <no.email@nospam.invalid> - 2012-10-29 09:46 -0700
    Re: Immutability and Python andrea crotti <andrea.crotti.0@gmail.com> - 2012-10-29 17:05 +0000
      Re: Immutability and Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-29 22:30 +0000
        Re: Immutability and Python Chris Kaynor <ckaynor@zindagigames.com> - 2012-10-29 15:45 -0700
          Re: Immutability and Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-29 23:14 +0000
    Re: Re: Immutability and Python Evan Driscoll <driscoll@cs.wisc.edu> - 2012-10-29 12:58 -0500
    Re: Immutability and Python Terry Reedy <tjreedy@udel.edu> - 2012-10-29 14:03 -0400
    Re: Immutability and Python Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-10-29 14:25 -0400

csiph-web