Unnecessary print statements in code
See original GitHub issue- Using latest version as provided on the master branch
- Searched for similar issues including closed ones
What is the purpose of your issue?
- Bug
- Feature Request
- Question
- Other
Description
There are two unnecessary print statements in the code, in spotdl.py lines 82 and 162.
Log
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
python - How can I fix unnecessary print statements from ...
The requirements want me to include a while loop in the code. I was thinking of changing it to while True: and putting...
Read more >The Case Against Print Statements in your Main Branch
This blog post is not an argument against using print statements while you code. Print statements are invaluable when writing a feature or ......
Read more >Is it a good habit to leave debugging 'print' lines in your codes?
No, it is never good practice to leave unnecessary code in your programs. Debugging print lines do not contribute to the operation of...
Read more >unnecessary print statements throughout codebase & add ...
Many unnecessary fmt.Print*() have been found throughout code base. If this is for debugging, I believe a debugger could be used.
Read more >The unreasonable effectiveness of print debugging
Using print statements, in contrast, forces you to formulate simple hypotheses and then verify or falsify them, e.g. "I think this variable in ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I wouldn’t want to remove them either. As @linusg mentioned they indeed help in making events easy to notice. We could remove the prefix by creating a new logger (
logzero.setup_logger
) without a prefix but IMO that would be too much just for showing blank lines in the console.I am also not sure if we should have these print statements carry over to log file, I don’t have any strong preference on this though.
pafy as a library seems to use a few too, like here: https://github.com/mps-youtube/pafy/blob/7c3150394a074002749e1d982334d0597911cb29/pafy/backend_youtube_dl.py#L182
That’s fine 😃. The real culprit of my excessive prints turned out to be the progress bars from #375. I’ll retract my PR in this case.