The hash built-in function of python has evolved after 3.3 to randomize the seed of the hash, which involves that the hash will return different results between two runs:
Note: By default, the hash() values of str, bytes and datetime objects are “salted” with an unpredictable random value. Although they remain constant within an individual Python process, they are not predictable between repeated invocations of Python.
I would like to know more about this process of randomization. Is the seed based on a timestamp ?
Aucun commentaire:
Enregistrer un commentaire