Serhiy Storchaka added the comment: The only case I know that would benefit is generating random data for tests. On my computer generating 2*28 bits with getrandbits() takes 2 sec (including 1 sec for converting from bytes to int), plus 1.4 sec for converting from int to bytes. Special API would speed up generating random bytes by 3.4 times. I would request for this functionality, but I don't want to clutter the API.
As for getrandbits.diff, I think that we should follow the principle "we're all consenting adults here". ---------- _______________________________________ 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