running python 2 vs 3

Marko Rauhamaa marko at pacujo.net
Thu Mar 20 16:50:45 EDT 2014


Mark Lawrence <breamoreboy at yahoo.co.uk>:

> On 20/03/2014 20:30, Marko Rauhamaa wrote:
>> I must say, though, that Python3 destroyed "print" forever for me. To
>> avoid nausea, I write sys.stdout.write() in all Python3 code.
>
> Not for me, I was using from __future__ import print_function for
> years so got used to typing those two extra brackets, plus print very
> kindly inserts the newlines for me.

That very realization helped me wean myself from "print." Its sole
raison d'être is the insertion of the newline, which it would be nicer
to micromanage anyway; that's how it's done in other programming
languages as well: C, perl, guile, ... (Well, ok, "echo" is the
exception.)


Marko



More information about the Python-list mailing list