Rewrite without using try-except to break out of two loops.
Rewrite without using try-except to break out of two loops.

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator