This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients mark.dickinson, pitrou, rhettinger, serhiy.storchaka, tim.peters, vstinner
Date 2020-04-22.04:55:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1587531346.32.0.918296506255.issue40346@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-04-22 04:55:46tim.peterssetrecipients: + tim.peters, rhettinger, mark.dickinson, pitrou, vstinner, serhiy.storchaka
2020-04-22 04:55:46tim.peterssetmessageid: <1587531346.32.0.918296506255.issue40346@roundup.psfhosted.org>
2020-04-22 04:55:46tim.peterslinkissue40346 messages
2020-04-22 04:55:46tim.peterscreate