Message367058
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." |
|
Date |
User |
Action |
Args |
2020-04-22 22:53:31 | vstinner | set | recipients:
+ vstinner, tim.peters, rhettinger, mark.dickinson, pitrou, serhiy.storchaka |
2020-04-22 22:53:31 | vstinner | set | messageid: <1587596011.17.0.134836008274.issue40346@roundup.psfhosted.org> |
2020-04-22 22:53:31 | vstinner | link | issue40346 messages |
2020-04-22 22:53:31 | vstinner | create | |
|