Tim Peters <t...@python.org> added the comment:

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.

----------

_______________________________________
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