All Questions
1 question
1
vote
1
answer
189
views
Is raising an unrelated exception for convenience acceptable? [duplicate]
Let's say I have a function that returns a dataset. First it tries to read it and if that fails it is requested from an API and then written:
def get_dataset():
try:
df = pd.read_csv('...