An empty list.
Thanks bro..
You're welcome
Hey this looks like a bad practice. You are making the caller of this code do extra work. It must check weather this pice of code returned an empty list or a result, in this case an error. Don't do this. Instead, give a solid answer, and in case of errors. Either pass it down to the caller (don't catch it here, the caller must) or, catch it and wrap it in a custom error type (that contains extra info) and throw the new error type. In both cases the Caller must catch the error and handle it however it wants. The way you're doing it is correct, but it's not done in a pythonic way.
Ohh alright. Thanks
Обсуждают сегодня