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 rhettinger
Recipients Steven.Barker, ideasman42, mark.dickinson, paul.moore, rhettinger, serhiy.storchaka, steve.dower, tim.golden, zach.ware
Date 2016-05-22.02:12:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463883136.45.0.621872241252.issue27072@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2016-05-22 02:12:16rhettingersetrecipients: + rhettinger, paul.moore, mark.dickinson, tim.golden, ideasman42, zach.ware, serhiy.storchaka, steve.dower, Steven.Barker
2016-05-22 02:12:16rhettingersetmessageid: <1463883136.45.0.621872241252.issue27072@psf.upfronthosting.co.za>
2016-05-22 02:12:16rhettingerlinkissue27072 messages
2016-05-22 02:12:16rhettingercreate