[issue16496] Simplify and optimize random_seed()

Mark Dickinson report at bugs.python.org
Sun Nov 18 10:08:38 CET 2012


Mark Dickinson added the comment:

> PyUCS4 also should be 32-bit, therefore Python requires such type.

Hmm, okay.  I wonder whether PY_UINT32_T should have been used there, to avoid doing the same checks in multiple places.

> What I really doubt is that now same integer seed on little-endian and
> big-endian give different random sequences. Is this important?

Yes, I think it's important that this code change doesn't change the random sequence if the seed is unchanged, on any platform (32 / 64-bit, big versus little endian).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16496>
_______________________________________


More information about the Python-bugs-list mailing list