Internal returns are more functional style, particularly for a function like this one that has a top-level branching structure and no side effects. Also, if none of the branches is executed, then a NameError will be raised, which is not very clear.