@@ -73,9 +73,6 @@ static char *usage_2 = "\
7373-O : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x\n\
7474-OO : remove doc-strings in addition to the -O optimizations\n\
7575-q : don't print version and copyright messages on interactive startup\n\
76- -R : use a pseudo-random salt to make hash() values of various types be\n\
77- unpredictable between separate invocations of the interpreter, as\n\
78- a defence against denial-of-service attacks\n\
7976-s : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n\
8077-S : don't imply 'import site' on initialization\n\
8178" ;
@@ -107,10 +104,10 @@ static char *usage_5 =
107104"PYTHONFAULTHANDLER: dump the Python traceback on fatal errors.\n\
108105" ;
109106static char * usage_6 = "\
110- PYTHONHASHSEED: if this variable is set to ``random``, the effect is the same \n\
111- as specifying the :option:`-R` option: a random value is used to seed the \n\
112- hashes of str, bytes and datetime objects. It can also be set to an integer \n\
113- in the range [0,4294967295] to get hash values with a predictable seed.\n\
107+ PYTHONHASHSEED: if this variable is set to ``random``, a random value is used \n\
108+ to seed the hashes of str, bytes and datetime objects. It can also be \n\
109+ set to an integer in the range [0,4294967295] to get hash values with a \n\
110+ predictable seed.\n\
114111" ;
115112
116113static int
@@ -347,21 +344,13 @@ Py_Main(int argc, wchar_t **argv)
347344 not interpreter options. */
348345 break ;
349346 }
350- switch (c ) {
351- case 'E' :
347+ if (c == 'E' ) {
352348 Py_IgnoreEnvironmentFlag ++ ;
353349 break ;
354- case 'R' :
355- Py_HashRandomizationFlag ++ ;
356- break ;
357350 }
358351 }
359- /* The variable is only tested for existence here; _PyRandom_Init will
360- check its value further. */
361- if (!Py_HashRandomizationFlag &&
362- (p = Py_GETENV ("PYTHONHASHSEED" )) && * p != '\0' )
363- Py_HashRandomizationFlag = 1 ;
364352
353+ Py_HashRandomizationFlag = 1 ;
365354 _PyRandom_Init ();
366355
367356 PySys_ResetWarnOptions ();
@@ -468,7 +457,7 @@ Py_Main(int argc, wchar_t **argv)
468457 break ;
469458
470459 case 'R' :
471- /* Already handled above */
460+ /* Ignored */
472461 break ;
473462
474463 /* This space reserved for other options */
0 commit comments