On Tue, 26 Jan 2010 22:23:11 -0800, Paul Rubin wrote: > Steven D'Aprano <ste...@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).
Sorry, I meant consistent with the rest of Python, which mostly uses functions/methods and only rarely statements (e.g. del and import). > 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. I don't pretend that the transition between statement and function syntax will be anything but inconvenient, but I believe the end result will be worth it. -- Steven -- http://mail.python.org/mailman/listinfo/python-list