开发者

Python User Interface Print Statements

开发者 https://www.devze.com 2023-02-01 17:16 出处:网络
I\'m writing a CLI helper program for managing a video library. Is it better to keep any kind of print statements in a single module, passing data via return statements, 开发者_Go百科or simply print m

I'm writing a CLI helper program for managing a video library. Is it better to keep any kind of print statements in a single module, passing data via return statements, 开发者_Go百科or simply print my output when I need to, where I need to?


Use return statements properly for returning Outputs from function calls so that your I/O interfaces between functions are clear and meaningful. If you want debugging, use logging module and when your program is development phases, you can use print statements in between too.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号