Message287601
The documentation on the hash randomization says that date, time and datetime have a hash based on strings, that is therefore nondeterministic in several runs of Python. I may either be missing a caveat, or the actual implementation does not follow its promise in case a timezone is attached to the datetime or time object:
~/svn/python/3.7-debug/python -c "import datetime;print(hash(d atetime.datetime(2016,10,10,0,0,0,0,datetime.timezone(datetime.timedelta(0, 36000)))))"
(this gives -6021186165085109055 all the time)
~/svn/python/3.7-debug/python -c "import datetime;print(hash(datetime.time(0,0,0,0, datetime.timezone(datetime.timedelta(0, 36000)))))"
(this gives -3850122659820237607 all the time) |
|
Date |
User |
Action |
Args |
2017-02-11 15:16:53 | arigo | set | recipients:
+ arigo |
2017-02-11 15:16:53 | arigo | set | messageid: <1486826213.38.0.893503150194.issue29535@psf.upfronthosting.co.za> |
2017-02-11 15:16:53 | arigo | link | issue29535 messages |
2017-02-11 15:16:52 | arigo | create | |
|