best practice for passing values between functions in Python

后端 未结 3 587
猫巷女王i
猫巷女王i 2021-02-05 22:08

What is pythonic best practice for allowing one function to use another function\'s returned values? e.g. Is it better to call one function within another, or better that functi

3条回答
  •  你的背包
    2021-02-05 22:34

    As import this would say, "explicit is better than implicit"; so go with the first form.

    If the number of return values becomes large, let use_value take a sequence argument instead.

提交回复
热议问题