Message366975
This wasn't written with subclassing in mind to begin with. A class was just an obvious way to allow advanced users to construct instances with their own states (e.g., so they could build pseudo-independent generators for parallel programming).
When SystemRandom got added, I believe that did about as little as possible just so that it "would work".
Making it easy to create subclasses was never a goal regardless.
I don't mind if that _becomes_ a goal, but with some disclaimers:
- If that makes any method currently in use slower, it's not worth it.
- Saving bytes in a SystemRandom instance is of no practical value.
So I think I'm agreeing with Raymond that reworking this doesn't solve any actual problem. But I'm not opposed to making changes for aesthetic reasons, provided such changes don't impose costs beyond the always-present risk of breaking things with any change. |
|
Date |
User |
Action |
Args |
2020-04-22 04:55:46 | tim.peters | set | recipients:
+ tim.peters, rhettinger, mark.dickinson, pitrou, vstinner, serhiy.storchaka |
2020-04-22 04:55:46 | tim.peters | set | messageid: <1587531346.32.0.918296506255.issue40346@roundup.psfhosted.org> |
2020-04-22 04:55:46 | tim.peters | link | issue40346 messages |
2020-04-22 04:55:46 | tim.peters | create | |
|