[issue33360] ALternative recipe for password using secrets

2018-04-26 Thread Juan Postlbauer
Juan Postlbauer added the comment: Just a clarification: by "infinite potential loop" I meant a loop that *theoretically* could last forever. Of course in practice it won't, but my experiments show that for the conditions in the example in average the current recipe genera

[issue33360] ALternative recipe for password using secrets

2018-04-25 Thread Juan Postlbauer
New submission from Juan Postlbauer : Chapter 15.3.4 shows a recipe with an infinite potential loop. An alternative would be: ''.join(sorted([choice(string.ascii_lowercase) for i in range(1)]+[choice(string.ascii_uppercase) for i in range(1)]+[choice(string.digits) for i in range(3