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: 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: References: <4F332007.9080800@wisc.edu> <4f3471e9$0$29986$c3e8da3$5496439d@news.astraweb.com> Date: Fri, 10 Feb 2012 09:00:55 -0800 X-Google-Sender-Auth: 437yVM4J-dKUpPeACVEfNSOIkwM Subject: Re: frozendict From: Chris Rebert To: Nathan Rice Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQl6uwVqV73bOva9GcqHZTEwkEacZYl1fW9N+n0CFDe6uZLjYj8rCgxekNnPG6A3vG39oRxb Cc: python-list X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 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 On Fri, Feb 10, 2012 at 8:53 AM, Nathan Rice wrote: > 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. =C2=A0If 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. =C2=A0I'd argue if the meanin= g > 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