running python 2 vs 3
Marko Rauhamaa
marko at pacujo.net
Fri Mar 21 02:08:42 EDT 2014
Chris Angelico <rosuav at gmail.com>:
> 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.
Marko
More information about the Python-list
mailing list