3 ms·
Yes, "then" would have been a better choice. But "then" isn't a keyword in Python. "else" is used with try blocks to indicate the exception didn't take place.
by Animats 8y ago
Yes, "then" would have been a better choice. But "then" isn't a keyword in Python.
"else" is used with try blocks to indicate the exception didn't take place. It makes more sense there, because it follows the "except" sections.