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


Groups > comp.lang.python > #5448

Re: dict: retrieve the original key by key

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'sys': 0.04; 'dictionary': 0.07; 'terry': 0.07; '3.x': 0.09; 'sun,': 0.09; 'though:': 0.09; 'url:dev': 0.09; 'pm,': 0.11; 'am,': 0.14; 'wrote:': 0.14; 'reedy': 0.16; 'stumbled': 0.16; 'subject:key': 0.16; 'url:sys': 0.16; 'exists': 0.19; 'far.': 0.19; 'cc:no real name:2**0': 0.20; 'cc:2**0': 0.20; 'cheers,': 0.20; 'header:In-Reply-To:1': 0.22; 'cc:addr:python-list': 0.22; 'keys': 0.23; 'chris': 0.27; 'function': 0.27; 'message-id:@mail.gmail.com': 0.28; 'cc:addr:python.org': 0.31; 'detail.': 0.31; 'strings,': 0.31; 'however,': 0.31; 'url:library': 0.31; 'url:docs': 0.33; 'module': 0.33; 'actually': 0.34; 'url:python': 0.37; 'received:google.com': 0.38; 'but': 0.38; 'url:org': 0.38; 'header:Received:5': 0.40; '2011': 0.62; 'received:74.125.83': 0.69; 'hey,': 0.74; 'subject:original': 0.84; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=rebertia.com; s=google; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:cc:content-type :content-transfer-encoding; bh=tKp4gKHaeMD6jIbv623PsCopjI0nrsSHTJJsL5/KIhY=; b=P0QWjxAtfp7xESkMeUKG2YkWaURUjQAs7Ox/WYtG8aHP/PkHkbkC+ploQamquxL3W2 5xRacdlCGQWaNcvOxacoW9Kw+jk+zgiH76IU1kFl8C4KTDk4bbZaYeJBc38nXCqPmuSA nfxj30tJV/kHC2Ur/tV11x/0z0A/PdIc2NJI4=
DomainKey-Signature a=rsa-sha1; c=nofws; d=rebertia.com; s=google; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:cc:content-type :content-transfer-encoding; b=Dyd4dyeQT6pCsQPd+zrkAvbcIlqa7ZLiwLE8hIsPvFoodbKMS//ZGH1C5dC1HdlEZG WzV6rs0IMLpGzOp9eOHi8vrmjLyN47xk/ZnhTSSqQ9Y5vv700U8sTZclTXMp3EtHYgBR Eo/+dxmf6Kr+j5Uqb7+4s/FeF9cCEt4okn6CA=
MIME-Version 1.0
Sender chris@rebertia.com
In-Reply-To <iqpefi$g0i$1@dough.gmane.org>
References <874o4wwenu.fsf@falma.de> <BANLkTikszH_r-PAuL0pJ8reMc+bGafuRew@mail.gmail.com> <mailman.1584.1305450715.9059.python-list@python.org> <4dcfa885$0$29996$c3e8da3$5496439d@news.astraweb.com> <87sjsgutqg.fsf@falma.de> <iqpefi$g0i$1@dough.gmane.org>
Date Sun, 15 May 2011 14:19:42 -0700
X-Google-Sender-Auth c1sLyGg85PAcdEol-tF9Q0bhYN8
Subject Re: dict: retrieve the original key by key
From Chris Rebert <clp2@rebertia.com>
Cc python-list@python.org
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
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.1602.1305494385.9059.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 82.94.164.166
X-Trace 1305494385 news.xs4all.nl 65870 [::ffff:82.94.164.166]:54145
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:5448

Show key headers only | View raw


On Sun, May 15, 2011 at 1:53 PM, Terry Reedy <tjreedy@udel.edu> wrote:
> On 5/15/2011 6:46 AM, Christoph Groth wrote:
<snip>
>> But hey, they keys of my dictionary are actually strings, so I can use
>> the built-in intern.  Somehow, I have never stumbled accross this
>> built-in function so far.
>
> It was, however, removed in 3.x as a seldom-externally-used internal
> implementation detail.

Still exists in sys module though:
http://docs.python.org/dev/library/sys.html#sys.intern

Cheers,
Chris

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


Thread

Re: dict: retrieve the original key by key Christoph Groth <cwg@falma.de> - 2011-05-15 11:11 +0200
  Re: dict: retrieve the original key by key Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-15 10:18 +0000
    Re: dict: retrieve the original key by key Christoph Groth <cwg@falma.de> - 2011-05-15 12:46 +0200
    Re: dict: retrieve the original key by key Terry Reedy <tjreedy@udel.edu> - 2011-05-15 16:53 -0400
    Re: dict: retrieve the original key by key Chris Rebert <clp2@rebertia.com> - 2011-05-15 14:19 -0700
    Re: dict: retrieve the original key by key Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-15 18:47 -0600

csiph-web