
On Tue, Oct 06, 2015 at 11:26:11AM -0700, Guido van Rossum wrote:
This is already looking good. An additional advantage to having a new module (as opposed to changing random) is that it could easily be backported as a PyPI package, all the way back to Python 2.7.
I do still think that having a concrete proposal for what should (initially) go into secrets.py would make for a more compelling PEP.
Thanks Guido. I'm not sure how much more concrete a proposal you are looking for. The PEP now lists a sample implementation. I've described it as "pseudo-code" only to indicate that it may be incomplete (e.g. missing some imports to make it work, lacking in error checking). It also lacks docstrings and tests, but otherwise I think it is most of the module. It's actually not very large, because most of the implementation is elsewhere (e.g. the random module). Is there something else the PEP should include? Any other requested functions? There have been a few functions suggested that were requested, e.g. password generation. https://www.python.org/dev/peps/pep-0506/ -- Steve