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


Groups > comp.lang.python > #8222

Re: what happens inside?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <digitig@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.008
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'dictionary': 0.07; 'received:209.85.160.174': 0.09; 'received:mail- gy0-f174.google.com': 0.09; 'am,': 0.14; 'wrote:': 0.14; '10:45': 0.16; 'from:addr:digitig': 0.16; 'from:name:tim rowe': 0.16; 'immutable': 0.16; 'immutable,': 0.16; 'rowe': 0.16; 'header:In- Reply-To:1': 0.21; 'appropriate': 0.21; 'keys': 0.23; "doesn't": 0.25; 'message-id:@mail.gmail.com': 0.28; 'subject:?': 0.29; 'received:209.85.160': 0.29; 'tuples': 0.30; "can't": 0.32; 'andrew': 0.32; 'change.': 0.32; 'to:addr:python-list': 0.33; 'list': 0.33; 'received:google.com': 0.37; 'useful': 0.37; 'something': 0.37; 'change': 0.37; 'received:209.85': 0.37; 'subject:: ': 0.38; 'sometimes': 0.39; 'received:209': 0.39; 'to:addr:python.org': 0.39; 'more': 0.60; 'june': 0.77
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=fx2R2dJLDlCSTX6c0hH7V9N9z9vdGFIc9d1nrABt31Y=; b=eRXDnXlcs6SdgGVx2g2nALI+ZsH2TRXydWOwA9owXyoqRXam2b260BO5d7oDnEfpSa 1JWcWrqI4Bf3jMOPBaWAXkXD8PREvwWtB+8/7ekM2LvleUqodZDIR98/Aci53BFBlBL4 450DzZqDdi4h8e0XIQhm5tNFvNx8IizkHie7s=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=VD29BlAgfcT8USHBw5c0m7sdioY8ZRghCy4lD5UJZo25gDrY6SHNOR76dOqnJa8m+D xhRP3+8MvJD3POB+UqBww+CgQJDutvz/5FRI06+32sMz0OAYNIzj9GN1iIuyy7JqoN86 vbZPvSKG7GuJTwwZyd3PYNzX47IzWQLJViMvA=
MIME-Version 1.0
In-Reply-To <4E020FDF.2010904@gmail.com>
References <BANLkTim5-pusEdT2Qhm-0NJtbazLJMvxXA@mail.gmail.com> <4E020FDF.2010904@gmail.com>
Date Wed, 22 Jun 2011 17:08:40 +0100
Subject Re: what happens inside?
From Tim Rowe <digitig@gmail.com>
To "comp.lang.python" <python-list@python.org>
Content-Type text/plain; charset=ISO-8859-1
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.287.1308758923.1164.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 82.94.164.166
X-Trace 1308758923 news.xs4all.nl 49179 [::ffff:82.94.164.166]:41899
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:8222

Show key headers only | View raw


On 22 June 2011 16:53, Andrew Berg <bahamutzero8825@gmail.com> wrote:
> On 2011.06.22 10:45 AM, Chetan Harjani wrote:
>> why tuples are immutable whereas list are mutable?
> Tuples are more efficient and more appropriate for a list of items that
> doesn't need to change.

And also it sometimes useful to be sure that something can't change.
In particular, efficient dictionary implementations need the keys to
be immutable, because it you change a key it /really/ fouls up the
look-up.

-- 
Tim Rowe

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


Thread

Re: what happens inside? Tim Rowe <digitig@gmail.com> - 2011-06-22 17:08 +0100

csiph-web