STINNER Victor <vstin...@python.org> added the comment:

Ok, PR 19631 is now ready for a review. I completed the documentation to better 
explain the rationale.

Copy of the What's New in Python 3.9 documentation:

"Add a new random.BaseRandom class: random number generator base class. A 
random.BaseRandom subclass must only implement a single method: getrandbits(), 
whereas a random.Random subclass must override 6 methods (getrandbits(), 
random(), randbytes(), seed(), getstate() and setstate())."

Copy of the commit message:

"BaseRandom implements random() and randbytes() using getrandbits().
It has no state and its gauss() method is thread safe. It has no
VERSION attribute and its seed() method has no version parameter.

The implementation of random.Random, random.SystemRandom and
random.Random subclasses are not affected by this change."

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40346>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to