[prev in list] [next in list] [prev in thread] [next in thread]
List: python-list
Subject: PYTHONHASHSEED VALUE
From: Rishabh Mishra <rishabhm120497 () gmail ! com>
Date: 2019-05-14 9:58:46
Message-ID: CAFz3BmkkNU9OyJ274rwx5+CaN-NV1LFy+mNRNkw+WVGQ2EHPGQ () mail ! gmail ! com
[Download RAW message or body]
Dear Sir/Ma'am,
I was upgrading a codebase from python2 to python3. The testcases fail in
python3 code because the set() function produces a different order from
python2.
e.g. set in py2 ={"it","is","rishabh","Mishra"}
Here in python 2.7 the PYTHONHASHSEED is disabled.
in py3 set ={"rishabh","it","is","mishra"}
I want the order to stay consistent with python2.7 to pass the test cases.
In python 3.3 above PYTHONHASHSEED=0 disbales the random shuffling but it
doesn't yield the same order as 2.7
So can you tell me for what value of PYTHONHASHSEED the order will stay
consistent?
Thank-You!
Yours sincerely,
Rishabh Mishra
--
https://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic