[Guido] > ... > An alternative would be to keep the secrets module linked to SystemRandom, > and improve the latter. Its link with os.random() is AFAIK undocumented. Its > API is clumsy but for code that needs some form of secret-ish bytes and > requires platform and Python version independence it might be better than > anything else. Then the secrets module is just what we recommend new users > on Python 3.6.
There's an issue currently open about this: http://bugs.python.org/issue27288 The docs for SystemRandom are very brief, so people may have actually noticed ;-) the first sentence: Class that uses the os.urandom() function for generating random numbers ... IOW, "uses os.urandom()" has been one of its only advertised qualities. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com