Re: Non-deterministic set ordering

2022-05-15 Thread MRAB
On 2022-05-16 04:20, Rob Cliffe via Python-list wrote: On 16/05/2022 04:13, Dan Stromberg wrote: On Sun, May 15, 2022 at 8:01 PM Rob Cliffe via Python-list wrote: I was shocked to discover that when repeatedly running the following program (condensed from a "real" program) under P

Re: Non-deterministic set ordering

2022-05-15 Thread Rob Cliffe via Python-list
Thanks, Paul.  Question answered! Rob Cliffe On 16/05/2022 04:36, Paul Bryan wrote: This may explain it: https://stackoverflow.com/questions/27522626/hash-function-in-python-3-3-returns-different-results-between-sessions On Mon, 2022-05-16 at 04:20 +0100, Rob Cliffe via Python-list wrote: On

Re: Non-deterministic set ordering

2022-05-15 Thread Paul Bryan
This may explain it: https://stackoverflow.com/questions/27522626/hash-function-in-python-3-3-returns-different-results-between-sessions On Mon, 2022-05-16 at 04:20 +0100, Rob Cliffe via Python-list wrote: > > > On 16/05/2022 04:13, Dan Stromberg wrote: > > > > On Sun, May 15, 2022 at 8:01 PM R

Re: Non-deterministic set ordering

2022-05-15 Thread Rob Cliffe via Python-list
On 16/05/2022 04:13, Dan Stromberg wrote: On Sun, May 15, 2022 at 8:01 PM Rob Cliffe via Python-list wrote: 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') }:

Re: Non-deterministic set ordering

2022-05-15 Thread Dan Stromberg
On Sun, May 15, 2022 at 8:01 PM Rob Cliffe via Python-list < python-list@python.org> wrote: > 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 wa

Re: Changing calling sequence

2022-05-15 Thread Greg Ewing
On 16/05/22 1:20 am, 2qdxy4rzwzuui...@potatochowder.com wrote: IMO, classmethods were/are a bad idea (yes, I'm probably in the minority around here, but someone has to be). I don't think class methods are a bad idea per se, but having them visible through instances seems unnecessary and confusi

Non-deterministic set ordering

2022-05-15 Thread Rob Cliffe via Python-list
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

Re: Changing calling sequence

2022-05-15 Thread 2QdxY4RzWzUUiLuE
On 2022-05-15 at 14:44:09 +1000, Chris Angelico wrote: > On Sun, 15 May 2022 at 14:27, dn wrote: > > > > On 15/05/2022 11.34, 2qdxy4rzwzuui...@potatochowder.com wrote: > > > On 2022-05-15 at 10:22:15 +1200, > > > dn wrote: > > > > > >> That said, a function which starts with a list of ifs-buts-