You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure whether this is a noteworthy issue, but I had my problems with it. In the compiler module program.py the seed of the default random.Random instance is set to 0:
I assume that this is for reproducible pseudo-randomness during compilation. However, this also affects the PRNG a user might use in his own program.
I suggest to highlight this behavior somewhere in the documentation, or switch to a custom instance of random.Random wherever reproducible pseudo-randomness is required in the compiler.
I did not test this, but I can imagine that resetting the global seed also has some unwanted side effects, if the compiler.py is called from a Python script, for example for automated compilation.
The text was updated successfully, but these errors were encountered:
I am not sure whether this is a noteworthy issue, but I had my problems with it. In the compiler module
program.py
the seed of the defaultrandom.Random
instance is set to 0:I assume that this is for reproducible pseudo-randomness during compilation. However, this also affects the PRNG a user might use in his own program.
I suggest to highlight this behavior somewhere in the documentation, or switch to a custom instance of
random.Random
wherever reproducible pseudo-randomness is required in the compiler.More about
random.Random
: https://docs.python.org/2/library/random.htmlI did not test this, but I can imagine that resetting the global seed also has some unwanted side effects, if the
compiler.py
is called from a Python script, for example for automated compilation.The text was updated successfully, but these errors were encountered: