kvnvelasco_33661
10/06/2023, 12:45 AMresult = call_some_internal_api(..)
if isinstance(result, Ok):
elif isinstance(result, Err1):
elif isinstance(result, Err2):
else:
# explode
The question is, is adding a return type to an overridden function considered a breaking change? As a follow-up, how do the authors feel about having all Err
types inherit from a common Error
class? Was this considered? What were the considerations?
result = call_some_internal_api(..)
if isinstance(result, BaseError):
# handle unhappy path