开发者

Python User Interface Print Statements

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜