Suppose I’m writing a function in python, this function can either be success or raise exception.
So which one shall I use:
- return
- return True
- no return
Edit:
Thanks for response. In this case I mean to ask if return Value have no further meaning, shall I still do a return True or something.
The case I’m working on is to write thrift server-side function, where I hesitated whether to use void or boolean type in the service api.
Looks like no
returnis needed. From your description, the invocation could look like:No need to analyze the return value.