Are there any specific advantages or disadvantages to either print or stderr?
Are there any specific advantages or disadvantages to either print or stderr ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
They’re just two different things.
printgenerally goes tosys.stdout. It’s worth knowing the difference betweenstdin,stdout, andstderr– they all have their uses.In particular,
stdoutshould be used for normal program output, whereasstderrshould be reserved only for error messages (abnormal program execution). There are utilities for splitting these streams, which allows users of your code to differentiate between normal output and errors.