Created
June 16, 2011 13:41
-
-
Save mnzk/1029249 to your computer and use it in GitHub Desktop.
functional(?) randomPasswordGenerator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#see https://gist.github.com/1023982 (donotuse.py) | |
randomPasswordGenerator = ( | |
lambda repeat, choice, partial, digits, letters: | |
partial(lambda map_join, n: | |
map_join(choice, repeat(digits+letters, n)), | |
lambda f, lis: ''.join(map(f, lis))))( | |
__import__('itertools').repeat, | |
__import__('random').choice, | |
__import__('functools').partial, | |
__import__('string').digits, | |
__import__('string').letters) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment