Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Truly simple systems... require infinite testing. -- Norman Augustine


devel / comp.lang.python / Re: Why no list as dict key?

SubjectAuthor
o Re: Why no list as dict key?Lars Liedtke

1
Re: Why no list as dict key?

<mailman.251.1650896794.20749.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18035&group=comp.lang.python#18035

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: lal...@solute.de (Lars Liedtke)
Newsgroups: comp.lang.python
Subject: Re: Why no list as dict key?
Date: Mon, 25 Apr 2022 16:20:09 +0200
Lines: 56
Message-ID: <mailman.251.1650896794.20749.python-list@python.org>
References: <CADrxXXmWEjmQmR0-mP7tugrEJ1YhqBCt_X-57fumqft4=rNPYw@mail.gmail.com>
<CAPTjJmovXqzOemVUCSoLQS--7egCj9ZQFA9DOQ9U=mgcFvUnZg@mail.gmail.com>
<CADrxXX=z_rtsBs29SDzPJTqgcHcUaKFcNUu4AXcCdoi0X+2-fA@mail.gmail.com>
<YmDGBT1SDbiUc8a4@scrozzle>
<CADrxXXkQekikNbeBxWpM=yLc6Vk2C5JSFo1AN2Db0fX7uSPNFQ@mail.gmail.com>
<CAPTjJmph9HRduN2Ms74t13ORB+zEYXmfCZLVMz=MStpnYsABxg@mail.gmail.com>
<be8b7956-d34c-3d78-ec2b-d74f293625ef@solute.de>
<20220425135431.tffgmtsugp5z5yj5@hjp.at>
<257b57ef-d549-5c29-b75a-6987185f480e@solute.de>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de 3k7BbFXGgGJU2tCX7s5TqwVYIc+YDLo8kkEfmnqvTM9A==
Return-Path: <lal@solute.de>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.014
X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'yet.': 0.04; 'string':
0.07; 'subject:Why': 0.07; 'schrieb': 0.09; 'url:de': 0.09;
'subject:list': 0.11; '(even': 0.16; '+0200,': 0.16; '721': 0.16;
'attributes': 0.16; 'brands': 0.16; 'dict': 0.16; 'dicts': 0.16;
'gmbh': 0.16; 'iterable': 0.16; 'sitz': 0.16; 'structures:': 0.16;
'subset': 0.16; 'tuples': 0.16; 'units,': 0.16; 'wrote:': 0.16;
'values': 0.17; 'probably': 0.17; 'to:addr:python-list': 0.20;
'received:de': 0.23; 'register': 0.25; 'header:User-Agent:1':
0.30; 'objects': 0.32; "didn't": 0.34; 'header:In-Reply-To:1':
0.34; 'complex': 0.35; 'though': 0.37; 'way': 0.38; 'use': 0.39;
'case.': 0.40; 'received:213': 0.40; 'something': 0.40; 'want':
0.40; 'policy': 0.62; 'germany': 0.62; 'skip:z 10': 0.62;
'privacy': 0.64; 'look': 0.65; 'phone:': 0.68; 'amtsgericht':
0.69; 'der': 0.69; 'fax:': 0.75; 'records': 0.75; 'url:php': 0.75;
'dr.': 0.77; 'ask,': 0.84; 'court:': 0.84; 'url-ip:62/8': 0.84;
'e-mail:': 0.88
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
Content-Language: en-US
In-Reply-To: <20220425135431.tffgmtsugp5z5yj5@hjp.at>
X-ClientProxiedBy: solute-exc2019.solute.ka (10.11.5.25) To
solute-exc2019.solute.ka (10.11.5.25)
X-EsetResult: clean, is OK
X-EsetId: 37303A291E3FD152677266
X-C2ProcessedOrg: 6b8a70a0-c2cb-4e72-a27d-0fc2d5a54e94
X-CrossPremisesHeadersFilteredBySendConnector: solute-exc2019.solute.ka
X-OrganizationHeadersPreserved: solute-exc2019.solute.ka
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://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: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <257b57ef-d549-5c29-b75a-6987185f480e@solute.de>
X-Mailman-Original-References: <CADrxXXmWEjmQmR0-mP7tugrEJ1YhqBCt_X-57fumqft4=rNPYw@mail.gmail.com>
<CAPTjJmovXqzOemVUCSoLQS--7egCj9ZQFA9DOQ9U=mgcFvUnZg@mail.gmail.com>
<CADrxXX=z_rtsBs29SDzPJTqgcHcUaKFcNUu4AXcCdoi0X+2-fA@mail.gmail.com>
<YmDGBT1SDbiUc8a4@scrozzle>
<CADrxXXkQekikNbeBxWpM=yLc6Vk2C5JSFo1AN2Db0fX7uSPNFQ@mail.gmail.com>
<CAPTjJmph9HRduN2Ms74t13ORB+zEYXmfCZLVMz=MStpnYsABxg@mail.gmail.com>
<be8b7956-d34c-3d78-ec2b-d74f293625ef@solute.de>
<20220425135431.tffgmtsugp5z5yj5@hjp.at>
 by: Lars Liedtke - Mon, 25 Apr 2022 14:20 UTC

Thx, didn't see it that way yet.

--
Lars Liedtke
Software Entwickler


Phone:
Fax: +49 721 98993-
E-mail: lal@solute.de

solute GmbH
Zeppelinstraße 15
76185 Karlsruhe
Germany

Marken der solute GmbH | brands of solute GmbH
billiger.de | Shopping.de

Geschäftsführer | Managing Director: Dr. Thilo Gans, Bernd Vermaaten
Webseite | www.solute.de
Sitz | Registered Office: Karlsruhe
Registergericht | Register Court: Amtsgericht Mannheim
Registernummer | Register No.: HRB 110579
USt-ID | VAT ID: DE234663798

Informationen zum Datenschutz | Information about privacy policy
http://solute.de/ger/datenschutz/grundsaetze-der-datenverarbeitung.php

Am 25.04.22 um 15:54 schrieb Peter J. Holzer:
> On 2022-04-25 15:13:19 +0200, Lars Liedtke wrote:
>> May I stupidly ask, why one would want to use an iterable (even immutable)
>> as dict key?
> A string is also an immutable iterable, so this is probably even the
> most common case.
>
> As for more complex data structures:
>
> * Tuples or immutable dicts are a good fit if want to group records by
> subset of their attributes (think "group by" in SQL)
>
> * Objects in general are often though of as units, even if they have
> composite values and you might want to look up something by that
> value.
>
> hp
>
>

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor