[issue33430] Import secrets module in secrets examples

2018-05-19 Thread Steven D'Aprano
Steven D'Aprano added the comment: Unless I've mucked it up, I just committed your patch on Github so I'm closing this ticket. Thanks. -- stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue33430] Import secrets module in secrets examples

2018-05-05 Thread Daniel Chimeno
Change by Daniel Chimeno : -- keywords: +patch pull_requests: +6397 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue33430] Import secrets module in secrets examples

2018-05-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: I've always expected that documentation for a module can assume that the module itself, and/or the function being described, has been imported. On the other hand, I have no objection to making this explicit, especially in the recipes section where it might n

[issue33430] Import secrets module in secrets examples

2018-05-05 Thread Daniel Chimeno
Daniel Chimeno added the comment: Relevant link: https://docs.python.org/3.7/library/secrets.html#recipes-and-best-practices -- ___ Python tracker ___

[issue33430] Import secrets module in secrets examples

2018-05-05 Thread Daniel Chimeno
New submission from Daniel Chimeno : In the secrets module documentation, the examples in `15.3.4. Recipes and best practices` need change things, I think this examples must run after a copy & paste into user terminal. Options for first example: 1: import string from secrets import choice