[issue40346] Add random.BaseRandom to ease implementation of subclasses
Mark Dickinson
report at bugs.python.org
Fri Apr 24 04:14:10 EDT 2020
Mark Dickinson <dickinsm at gmail.com> added the comment:
[Tim]
> Who subclasses Random in the real world? Who would want to?
Um. Me?
Or at least, I *wanted* to, when I was playing around with PCG. (See https://github.com/mdickinson/pcgrandom.) But after running into the same inelegancies (please note that I'm not calling them *issues*) as Victor, I decided to avoid the subclassing. That led to other inelegancies, like have to reproduce the code for all the various distribution sampling methods (beta, gamma, ...). But I'm okay with that; this was just a toy project.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40346>
_______________________________________
More information about the Python-bugs-list
mailing list