allow line break at operators

Ben Finney ben+python at benfinney.id.au
Sun Aug 14 11:25:39 CEST 2011


Seebs <usenet-nospam at seebs.net> writes:

> I was utterly dumbfounded when I found out that "print" in Python is a
> kind of statement, not a function or something comparable. (This seems
> to have changed recentlyish.)

It has long been recognised as a wart, but it required waiting for an
opportunity for breaking backward compatibility (the Python 2 → 3
transition) to fix it.

If you can't yet switch to Python 3, you can explicitly ask for ‘print’
as a function in Python 2.6 or later.

More at <URL:http://wiki.python.org/moin/PrintAsFunction>.

-- 
 \       “The generation of random numbers is too important to be left |
  `\                                    to chance.” —Robert R. Coveyou |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list