running python 2 vs 3
rustompmody at gmail.com
Fri Mar 21 07:51:17 CET 2014
On Friday, March 21, 2014 11:38:42 AM UTC+5:30, Marko Rauhamaa wrote:
> Chris Angelico :
> > Then you're probably not using "sys.stdout.write" but some other file
> > object's write method.
> Correct, sys.stderr.write would have been a more accurate choice.
> > Also, I find it highly unusual that you never use print in its most
> > basic and intended form.
> Printing to the stdout (hardcoded) is a relatively rare need. Mostly,
> I've used "print" for diagnostic messages, and whenever I've had to
> create actual output, I've parameterized the target object.
Ive no opinion on whether python 2 or 3 print is better.
However I believe that people trying to help noobs would be actually
more helpful if they indicated that using prints all over code is not kosher.
Then whats the use/sense of print?? Debugging...
More information about the Python-list