in Python, why use "val = param or None' when you can take default params?

后端 未结 0 785
夕颜
夕颜 2021-01-18 09:45

I found some examples like below:

def some_func(param):
    inner_var = param or None
    # rest of codes...

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