Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

: is not an identifier


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

SubjectAuthor
o Re: Why no list as dict key?Abdur-Rahmaan Janhangeer

1
Re: Why no list as dict key?

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: arj.pyt...@gmail.com (Abdur-Rahmaan Janhangeer)
Newsgroups: comp.lang.python
Subject: Re: Why no list as dict key?
Date: Thu, 21 Apr 2022 07:21:57 +0400
Lines: 32
Message-ID: <mailman.178.1650511331.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>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de W2Q/trts/T6CA+vIHAuuYQIR3GJjDS9HcwS0lQj0yHjw==
Return-Path: <arj.python@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=b7iYhVSg;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url-ip:140.82/16': 0.03;
'2022': 0.05; 'assumes': 0.07; 'subject:Why': 0.07;
'subject:list': 0.11; '&gt;': 0.14; 'url:github': 0.14;
'url:mailman': 0.15; 'problem.': 0.15; 'url-ip:140/8': 0.15;
'equal.': 0.16; 'from:addr:arj.python': 0.16; 'from:name:abdur-
rahmaan janhangeer': 0.16; 'hash': 0.16; 'janhangeer': 0.16;
'mauritius': 0.16; 'objects.': 0.16; 'pointers': 0.16; 'wrote:':
0.16; 'github': 0.17; 'thu,': 0.19; 'to:addr:python-list': 0.20;
'maybe': 0.22; 'skip:& 40': 0.22; 'url-ip:188.166.95.178/32':
0.25; 'url-ip:188.166.95/24': 0.25; 'url:listinfo': 0.25; 'url-
ip:188.166/16': 0.25; 'object': 0.26; 'url-ip:51/8': 0.26; 'blog':
0.30; 'url-ip:188/8': 0.31; 'same,': 0.32; 'to:name:python': 0.32;
'message-id:@mail.gmail.com': 0.32; 'but': 0.32; 'same': 0.34;
'header:In-Reply-To:1': 0.34; 'received:google.com': 0.34;
'from:addr:gmail.com': 0.35; 'those': 0.36; 'lists': 0.37;
'received:209.85': 0.37; 'received:209': 0.39; 'two': 0.39;
'should': 0.40; 'skip:o 10': 0.61; 'drop': 0.69; 'themselves.':
0.69; 'speed': 0.71
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=IwGSWJ1lvXpMoLBUB6UKlbZT++tYiMPBas5ha9iRN/w=;
b=b7iYhVSguesw1lcWf2x4yvv+H/3xZmKTqDZiZ2ncdn22/4PBWTfiMHKR5WMjph9Q9D
TakldElOrIYInnP16tn8VRN9QlFmIx2vAYhObc3AiVbI053tZIO0Ky4M10uj5S6uLoZo
2aaCM2bi8Of0Oa0KgZyShItHJnKUKD1gnJIHc22Yfu0j8EjbKijb4ylTDDjbGWQkz+4g
02tRrf4XB0t6zJxpLoyNUI5RKDRjtwQvl5ersWw5TXToGN0KbhFo+xq3oh0/kk50ycCs
kscsyjjmwq2HbLZivphfsmYLboveQW+hVrFHz62pQkF+4Z6kBSUdkHNAMnDDVGBLjOFv
dpSg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=IwGSWJ1lvXpMoLBUB6UKlbZT++tYiMPBas5ha9iRN/w=;
b=XVDb3C2clbe6PKVMluVdPqwTY3CSQaUj4GfH0yWS7sa7I/hJ2eMsQL6I1H9vIYYcV5
T5QfVCOzvq4ZYJaSvPI/A4Z9m9ucNljCXvMHDzQjKkENoiUUb5yRbVAgO3rxti+3c+XT
mJeBlsWGmKd8N1ayM0dS0oHRunGaieZUYL2A7k0YnN/X8LJGpDKyh9s7PVoEW/OyZXh2
VrqQrjWJOGrTgNVK9qUESJkf21zvEo9boU5+4BISZ9X2lgPtJDa0/wSor22lezedXZwX
pSG92E8iUKXTfWLmsNJnZQNwtg/rd3tHC/3vslQhwsr8q1VjMl0qiQOj030IG/bU4t5S
YmJw==
X-Gm-Message-State: AOAM531LB/KSrJ/OG/pGkGnlDG7cm4D6QBMHCHbAMO9qakrCz3VS80rK
Lmup6/6+q3IDgQSHDbX5QxnQwqDY3oWV9qZJNq78fEk3nrM=
X-Google-Smtp-Source: ABdhPJy5BxyhuWW7B0f+5Siezsh13nXVV97xpKRtZ1ijyLFEfC3xQfQ0xP4ahsNFl0+DGD0OercmYCDmkRvj1ZFH9a0=
X-Received: by 2002:a05:6512:1585:b0:448:3936:a5a0 with SMTP id
bp5-20020a056512158500b004483936a5a0mr16698108lfb.108.1650511329118; Wed, 20
Apr 2022 20:22:09 -0700 (PDT)
In-Reply-To: <YmDGBT1SDbiUc8a4@scrozzle>
X-Content-Filtered-By: Mailman/MimeDel 2.1.39
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: <CADrxXXkQekikNbeBxWpM=yLc6Vk2C5JSFo1AN2Db0fX7uSPNFQ@mail.gmail.com>
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>
 by: Abdur-Rahmaan Janhan - Thu, 21 Apr 2022 03:21 UTC

Assumes checking for object equality before inserting.
If they are they same, do we need different hashes?

Kind Regards,

Abdur-Rahmaan Janhangeer
about <https://compileralchemy.github.io/> | blog
<https://www.pythonkitchen.com>
github <https://github.com/Abdur-RahmaanJ>
Mauritius

On Thu, Apr 21, 2022 at 7:15 AM <2QdxY4RzWzUUiLuE@potatochowder.com> wrote:

> On 2022-04-21 at 06:22:53 +0400,
> Abdur-Rahmaan Janhangeer <arj.python@gmail.com> wrote:
>
> > Maybe hashes should point to an object rather than being the hash of an
> > object themselves.
> > Maybe the speed drop is not worth it.
>
> Then you have a different problem.
>
> x = [1, 2, 3]
> y = [n for n in 1, 2, 3]
>
> Those two lists (x and y) are separate but equal objects. Being
> separate, pointers to them would not be equal. Being equal, they have
> to have the same hash.
> --
> https://mail.python.org/mailman/listinfo/python-list
>

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor