I'm sure this concept has come up before but I can't find a good, simple answer. Is using try/finally a bad way to handle functions with multiple returns? For example I have
try:
if x:
return update(1)
else:
return update(2)
finally:
notifyUpdated()
This just seems nicer than storing update() commands in a temporary variable and returning that.