R. David Murray added the comment:

It seems reasonable to me, but I'm not the one to sign off on something like 
this.  I've nosied someone who will have an opinion :)

Would doing:

    mybytes = bytes(random.randint(0, 255) for i in range(size))

be faster enough to be workable?  I suppose that might build a list under the 
covers...maybe preallocating a bytearray and filling it with ints would work 
better.

----------
nosy: +r.david.murray, rhettinger
title: Ability to get random bits from random.Random (as with os.urandom) -> 
Ability to get random bytes from random.Random (as with os.urandom)

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

Reply via email to