Better practice than returning a bunch of Nones when function runs into an issue?

后端 未结 0 595
感情败类
感情败类 2021-02-19 02:39

I often have functions that return multiple outputs which are structured like so:

def f(vars):
    ...
    if something_unexpected():
        return None, None
           


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题