Reputation: 493
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, or simply print my output when I need to, where I need to?
Upvotes: 0
Views: 380
Reputation: 56941
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.
Upvotes: 6