Last active
January 8, 2016 13:25
-
-
Save kevinschoon/1e6a9a9a0536f1936bdd to your computer and use it in GitHub Desktop.
recurse
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
import sys | |
def recurse(count=0): | |
count += 1 | |
if count + 2 < sys.getrecursionlimit(): | |
recurse(count) | |
else: | |
answer = raw_input("YOU HAVE REACHED {} DO YOU DARE TO CONTINUE?! [yes/no/whatev]: ".format(count)) | |
if answer == "yes": | |
sys.setrecursionlimit(sys.getrecursionlimit() + 1) | |
recurse(count) | |
elif answer == "whatev": | |
recurse(count) | |
print("Amature!") | |
if __name__ == '__main__': | |
recurse() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment