Tried to get the recursion issues with if stmts working.

This commit is contained in:
Dave Halter
2015-11-16 11:30:30 +01:00
parent 4361ce0778
commit 03efbca586
4 changed files with 42 additions and 10 deletions

View File

@@ -218,3 +218,23 @@ else:
a = ''
#? int()
a
# -----------------
# Recursion issues
# -----------------
def possible_recursion_error(filename):
if filename == 'a':
return filename
# It seems like without the brackets there wouldn't be a RecursionError.
elif type(filename) == str:
return filename
if NOT_DEFINED:
s = str()
else:
s = str()
#? str()
possible_recursion_error(s)