python 3's adoption

Paul Rubin no.email at nospam.invalid
Wed Jan 27 07:23:11 CET 2010


Steven D'Aprano <steven at REMOVE.THIS.cybersource.com.au> writes:
> print as a function is more consistent and more convenient than print as 
> a statement. 

Convenience is subjective, but the 3.x 'print' behavior is definitely
inconsistent (i.e. different from 2.x).  The change makes a lot of my
code silently produce wrong results, too.  I often print tuples to show
what a program is doing:

    print (timestamp, 'transmogrified', blob)

which in 2.x prints a parenthesized tuple that I can later read back in
with eval.  That line of code still prints a message, but in a different
format, instead of throwing an error.



More information about the Python-list mailing list