I have a function that should return the result of a query.
It works, but my question is related to what is the best practise.
The return value in this case is a response object from an API, that contains a value which indicate whether the query failed or not. The first question then is, should I have my function return the result of the query as it is?
For the cases where the return object says nothing about how the execution of the function went, should it also return a boolean to indicate if things went as it should?
And lastly, if I would need to return more than one variable, should they be returned as a tuple, a dictionary, or in some other way?
I haven't been programming with Python for long. I know a bit, but I lack a lot of knowledge about how to write good/nice code.