"if, elif, else" constructs require the "end" keyword only once:
#
==
==
==
==
==
if (condition1):
print '1st'
elif (condition2):
print '2nd'
else:
print 'Something else'
end
#
==
==
==
==
==
"try, except, ensure" constructs require the "end" keyword over and over for every block:
#
==
==
==
==
==
try:
raise DirectoryNotFoundException()
end
except e as FileNotFoundException:
print 'FNF'
end
except e:
print 'Other'
end
ensure:
print 'The end'
end
#
==
==
==
==
==
Standardize on one method of handling blocks. See discussion here:
http://groups.google.com/group/boolang/browse_thread/thread/269549c0f7b907de