Raymond Hettinger added the comment:

> On the other hand, this limit isn't imposed elsewhere.

There are a number of places in the language with these limits.  In general, 
we're opening them up to wider limits if there are valid use cases and if it 
doesn't immediately shoot you in the foot like it does here.

Practicality is a reasonable design consideration.  Mitigation of harm is also 
reasonable design consideration.  Foolish consistently is, well, you know how 
the saying goes :-)

> Might having a method added to `randome.Random` that returns 
> random bits (as os.urandom does), be something Python project
> would consider accepting?

It isn't needed.  As far as I know, there has never been a user request for 
this functionality nor a presentation of use cases that benefit it.  The API is 
already bloated and we already have one way to do it with int.to_bytes().  
Also, we should keep this tracker entry focused on the OP's report and not 
meander.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27072>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to