change of random state when pyc created??

Alan Isaac aisaac at american.edu
Tue May 8 13:59:27 EDT 2007


"Steven D'Aprano" <steven at REMOVE.THIS.cybersource.com.au> wrote in message
news:pan.2007.05.08.07.40.52 at REMOVE.THIS.cybersource.com.au...
> My testing suggests the bug is *not* to do with pyc files at all. I'm
> getting different results when running the files, even when the directory
> is read-only (and therefore no pyc files can be created).
>
> My results suggest that setting the seed to the same value does NOT give
> identical results, *even though* the random number generator is giving
> the same results.
>
> So I think we can discount the issue being anything to do with either
> the .pyc files or the random number generator.


I do not know how Python handles your use of a readonly directory.
What I have seen is:

      - when a test1.pyc file is present, I always get the
        same outcome (result1)
      - when a test1.pyc file is NOT present, I always get
        the same outcome (result2)
      - the two outcomes are different (result1 != result2)

Do you see something different than this if you run the
test as I suggested?  If not, how can in not involve the
.pyc file (in some sense)?

Cheers,
Alan Isaac





More information about the Python-list mailing list