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


Groups > comp.lang.python > #20174

Re: frozendict

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!feeds.news.ox.ac.uk!news.ox.ac.uk!nntp-feed.chiark.greenend.org.uk!ewrotcd!news.nosignal.org!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <chris@rebertia.com>
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; 'context': 0.04; 'immutable': 0.09; 'url:peps': 0.09; 'am,': 0.12; 'protocol': 0.15; 'cache,': 0.16; 'pythonic': 0.16; 'rejected:': 0.16; '\xc2\xa0if': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.18; 'previously': 0.19; 'seems': 0.20; 'cheers,': 0.20; 'memory': 0.21; 'input': 0.22; 'header:In-Reply-To:1': 0.22; 'feb': 0.22; 'knowing': 0.23; 'pep': 0.23; 'url:dev': 0.23; 'convert': 0.25; 'cc:2**0': 0.26; 'stuff': 0.26; 'function': 0.27; 'message- id:@mail.gmail.com': 0.29; 'cc:addr:python.org': 0.29; 'argue': 0.30; 'chris': 0.30; 'pretty': 0.31; 'proposed': 0.32; 'object': 0.33; 'fri,': 0.34; 'rather': 0.34; 'url:python': 0.35; 'received:209.85.214': 0.36; 'received:google.com': 0.37; 'received:209.85': 0.38; 'some': 0.38; 'should': 0.38; 'url:org': 0.39; 'received:209': 0.39; 'being': 0.40; 'safe': 0.70; 'guaranteed': 0.77; 'contiguous': 0.84; 'freeze': 0.84; 'nathan': 0.84; 'sender:addr:chris': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=rebertia.com; s=google; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=vQ6wIiwWFf53oPlHfWzYAWeuhtYH1ss/kaCFzi2YYYs=; b=VIdEFACmIAf097+ZhpyYyA4TBGp9ttNiBoXAg5bXh6tuB42NRKnAUb3M02tWRfo97D E2G166kyFhvSOIZMq6BZd6sYVFiyVuiqYxr88aAmstsCIkEA77CruBnpo8uvt3MtoPsC RMgi7/vxHwkyW+iJL8aR4k33kc9LuF1V0ZY8Y=
MIME-Version 1.0
Sender chris@rebertia.com
In-Reply-To <CAOFbRmJSntQUtt3_ooWZ12RiEW_pYdxehgr7GzYU-NvD7py9DQ@mail.gmail.com>
References <4F332007.9080800@wisc.edu> <jgv9ps$35g$1@dough.gmane.org> <mailman.5558.1328759017.27778.python-list@python.org> <Xns9FF46B35EDFF9duncanbooth@127.0.0.1> <mailman.5588.1328798176.27778.python-list@python.org> <Xns9FF497406322duncanbooth@127.0.0.1> <CAOFbRmJLyNA=-oM3eyASVE0EzA6SrjguP7Lv1Vsj2qA4=qU-cw@mail.gmail.com> <mailman.5597.1328805384.27778.python-list@python.org> <4f3471e9$0$29986$c3e8da3$5496439d@news.astraweb.com> <CAOFbRmJN=XicYeUjN9+a800FqvRGigA4p_88mU=Pj1ZRtcgwfw@mail.gmail.com> <CAPTjJmrjjmxgPctMfz-69KN_BHYjpR+=VRHoX-efdMh_fBTyVQ@mail.gmail.com> <CAOFbRmJSntQUtt3_ooWZ12RiEW_pYdxehgr7GzYU-NvD7py9DQ@mail.gmail.com>
Date Fri, 10 Feb 2012 09:00:55 -0800
X-Google-Sender-Auth 437yVM4J-dKUpPeACVEfNSOIkwM
Subject Re: frozendict
From Chris Rebert <clp2@rebertia.com>
To Nathan Rice <nathan.alexander.rice@gmail.com>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
X-Gm-Message-State ALoCoQl6uwVqV73bOva9GcqHZTEwkEacZYl1fW9N+n0CFDe6uZLjYj8rCgxekNnPG6A3vG39oRxb
Cc python-list <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
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.5671.1328893258.27778.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1328893258 news.xs4all.nl 6944 [2001:888:2000:d::a6]:44052
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:20174

Show key headers only | View raw


On Fri, Feb 10, 2012 at 8:53 AM, Nathan Rice
<nathan.alexander.rice@gmail.com> wrote:
<snip>
> Lets also not forget that knowing an object is immutable lets you do a
> lot of optimizations; it can be inlined, it is safe to convert to a
> contiguous block of memory and stuff in cache, etc.  If you know the
> input to a function is guaranteed to be frozen you can just go crazy.
> Being able to freeze(anyobject) seems like a pretty clear win.
> Whether or not it is pythonic is debatable.  I'd argue if the meaning
> of pythonic in some context is limiting, we should consider updating
> the term rather than being dogmatic.

It's been proposed previously and rejected:
PEP 351 -- The freeze protocol
http://www.python.org/dev/peps/pep-0351/

Cheers,
Chris

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


Thread

Re: frozendict Nathan Rice <nathan.alexander.rice@gmail.com> - 2012-02-08 22:43 -0500
  Re: frozendict Duncan Booth <duncan.booth@invalid.invalid> - 2012-02-09 10:33 +0000
    Re: frozendict Nathan Rice <nathan.alexander.rice@gmail.com> - 2012-02-09 09:36 -0500
      Re: frozendict Duncan Booth <duncan.booth@invalid.invalid> - 2012-02-09 14:52 +0000
        Re: frozendict Nathan Rice <nathan.alexander.rice@gmail.com> - 2012-02-09 10:19 -0500
          Re: frozendict Duncan Booth <duncan.booth@invalid.invalid> - 2012-02-09 18:47 +0000
        Re: frozendict Ian Kelly <ian.g.kelly@gmail.com> - 2012-02-09 09:35 -0700
          Re: frozendict Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-02-10 01:24 +0000
            Re: frozendict Nathan Rice <nathan.alexander.rice@gmail.com> - 2012-02-09 21:30 -0500
            Re: frozendict Terry Reedy <tjreedy@udel.edu> - 2012-02-09 22:33 -0500
            Re: frozendict Chris Angelico <rosuav@gmail.com> - 2012-02-10 21:08 +1100
            Re: frozendict Nathan Rice <nathan.alexander.rice@gmail.com> - 2012-02-10 11:53 -0500
            Re: frozendict Chris Rebert <clp2@rebertia.com> - 2012-02-10 09:00 -0800
            Re: frozendict Nathan Rice <nathan.alexander.rice@gmail.com> - 2012-02-10 13:14 -0500
              Re: frozendict John Nagle <nagle@animats.com> - 2012-02-10 10:57 -0800
                Re: frozendict 88888 Dihedral <dihedral88888@googlemail.com> - 2012-02-10 21:52 -0800
                Re: frozendict John Nagle <nagle@animats.com> - 2012-02-13 13:15 -0800
        Re: frozendict Nathan Rice <nathan.alexander.rice@gmail.com> - 2012-02-09 11:50 -0500

csiph-web