Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Invest in physics -- own a piece of Dirac!


devel / comp.lang.python / Non-deterministic set ordering

SubjectAuthor
o Non-deterministic set orderingRob Cliffe

1
Non-deterministic set ordering

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

 copy mid

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

 copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: rob.cli...@btinternet.com (Rob Cliffe)
Newsgroups: comp.lang.python
Subject: Non-deterministic set ordering
Date: Mon, 16 May 2022 04:01:10 +0100
Lines: 20
Message-ID: <mailman.420.1652670078.20749.python-list@python.org>
References: <d93aad1d-8586-b844-d3de-fa9648535244@btinternet.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de rNWZ9I0AD0IqfHvSy9uUaAsaYiz9CvuOAFR4GwKapgzA==
Return-Path: <rob.cliffe@btinternet.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=btinternet.com header.i=@btinternet.com header.b=ppbjqvGW;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.168
X-Spam-Level: *
X-Spam-Evidence: '*H*': 0.69; '*S*': 0.03; 'identical': 0.09;
'"real"': 0.16; 'order?': 0.16; 'python': 0.16; 'to:addr:python-
list': 0.20; 'code': 0.23; 'anyone': 0.25; 'output': 0.28; 'header
:User-Agent:1': 0.30; 'program': 0.31; 'to:name:python': 0.32;
'received:192.168.1': 0.32; 'running': 0.34; 'subject:skip:d 10':
0.35; 'following': 0.35; 'received:192.168': 0.37; 'thanks': 0.38;
'explain': 0.40; 'received:213': 0.40; 'should': 0.40;
'repeatedly': 0.69; 'discover': 0.80; 'rob': 0.84; 'subject:Non':
0.84; 'shocked': 0.93
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=btinternet.com;
s=btmx201904; t=1652670070;
bh=5LiopjogyF2iSDv+g6JahLajTqQ6lLxJtYoeSqZtSlY=;
h=Message-ID:Date:MIME-Version:To:From:Subject;
b=ppbjqvGWzqyhJ2AtDNkY6y9G6d0gAyvLcfMsvZZlSGxF3ben+nOcEnmxa82yC9nWMjs1aNu1OQAQnzRik4RkI7pMPwFpCgdz9KP5zc/vNh9amDl7+XU33J1xiLO2t9MVJgJ82YUyXZXzhc83XV7m68APRkUNLQy+zsobcuzm8DAnHgqNwCZG/8vhHG8ixuqUTULNmucMNnwa42qxtA21JeSnkJk4CKWfPbfKdSmM86MvWwya6flMGBSIfTzNjprSWOV8A8y9VotO0csB5GGtX4eiQ8Hhcu9vWq+Q7xH71MQUYS4T9oXnLHdF8ril/4PrG4g/2vP/ordgogDlS5gTyw==
Authentication-Results: btinternet.com;
auth=pass (PLAIN) smtp.auth=rob.cliffe@btinternet.com;
bimi=skipped
X-SNCR-Rigid: 613A901C237E4DB8
X-Originating-IP: [217.43.24.2]
X-OWM-Source-IP: 217.43.24.2 (GB)
X-OWM-Env-Sender: rob.cliffe@btinternet.com
X-VadeSecure-score: verdict=clean score=0/300, class=clean
X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvfedrheeggdeikecutefuodetggdotefrodftvfcurfhrohhfihhlvgemuceutffkvffkuffjvffgnffgvefqofdpqfgfvfenuceurghilhhouhhtmecufedtudenucenucfjughrpefkffggfgfvhffutgfgsehtkeertddtfeejnecuhfhrohhmpeftohgsucevlhhifhhfvgcuoehrohgsrdgtlhhifhhfvgessghtihhnthgvrhhnvghtrdgtohhmqeenucggtffrrghtthgvrhhnpeehudevtdfgfeegvdelueeigeeuuedtgfehveefudeiiedtffeuffegvdejieevgfenucfkphepvddujedrgeefrddvgedrvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddrvddtgegnpdhinhgvthepvddujedrgeefrddvgedrvddpmhgrihhlfhhrohhmpehrohgsrdgtlhhifhhfvgessghtihhnthgvrhhnvghtrdgtohhmpdhnsggprhgtphhtthhopedupdhrtghpthhtohepphihthhhohhnqdhlihhsthesphihthhhohhnrdhorhhg
X-RazorGate-Vade-Verdict: clean 0
X-RazorGate-Vade-Classification: clean
X-SNCR-hdrdom: btinternet.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.9.0
Content-Language: en-GB
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: <d93aad1d-8586-b844-d3de-fa9648535244@btinternet.com>
 by: Rob Cliffe - Mon, 16 May 2022 03:01 UTC

I was shocked to discover that when repeatedly running the following
program (condensed from a "real" program) under Python 3.8.3

for p in { ('x','y'), ('y','x') }:
    print(p)

the output was sometimes

('y', 'x')
('x', 'y')

and sometimes

('x', 'y')
('y', 'x')

Can anyone explain why running identical code should result in
traversing a set in a different order?
Thanks
Rob Cliffe

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor