Message153873
On Feb 21, 2012, at 09:48 AM, Marc-Andre Lemburg wrote:
>The flag should probably be removed - simply because
>the env var is not a flag, it's a configuration parameter.
>
>Exposing the seed value as sys.hashseed would be better and more useful
>to applications.
Okay, after chatting with __ap__ on irc, here's what I think the behavior
should be:
sys.flags.hash_randomization should contain just the value given by the -R
flag. It should only be True if the flag is present, False otherwise.
sys.hash_seed contains the hash seed, set by virtue of the flag or envar. It
should contain the *actual* seed value used. E.g. it might be zero, the
explicitly set integer, or the randomly selected seed value in use during this
Python execution if a random seed was requested.
If you really need the envar value, getenv('PYTHONHASHSEED') is good enough
for that. |
|
Date |
User |
Action |
Args |
2012-02-21 15:42:34 | barry | set | recipients:
+ barry, lemburg, gvanrossum, tim.peters, loewis, georg.brandl, terry.reedy, gregory.p.smith, jcea, mark.dickinson, pitrou, vstinner, christian.heimes, benjamin.peterson, eric.araujo, grahamd, Arfrever, v+python, alex, zbysz, skrah, dmalcolm, gz, neologix, Arach, Mark.Shannon, python-dev, eric.snow, Zhiping.Deng, Huzaifa.Sidhpurwala, Jim.Jewett, PaulMcMillan, fx5, skorgu |
2012-02-21 15:42:33 | barry | link | issue13703 messages |
2012-02-21 15:42:33 | barry | create | |
|