[Python-checkins] r58440 - peps/trunk/pep-3105.txt
guido.van.rossum
python-checkins at python.org
Fri Oct 12 22:25:27 CEST 2007
Author: guido.van.rossum
Date: Fri Oct 12 22:25:27 2007
New Revision: 58440
Modified:
peps/trunk/pep-3105.txt
Log:
Clarify backwards compatibility.
Modified: peps/trunk/pep-3105.txt
==============================================================================
--- peps/trunk/pep-3105.txt (original)
+++ peps/trunk/pep-3105.txt Fri Oct 12 22:25:27 2007
@@ -93,9 +93,23 @@
=======================
The changes proposed in this PEP will render most of today's ``print``
-statements invalid, only those which incidentally feature parentheses
+statements invalid. Only those which incidentally feature parentheses
around all of their arguments will continue to be valid Python syntax
-in version 3.0.
+in version 3.0, and of those, only the ones printing a single
+parenthesized value will continue to do the same thing. For example,
+in 2.x::
+
+ >>> print ("Hello")
+ Hello
+ >>> print ("Hello", "world")
+ ('Hello', 'world')
+
+whereas in 3.0::
+
+ >>> print ("Hello")
+ Hello
+ >>> print ("Hello", "world")
+ Hello world
Luckily, as it is a statement in Python 2, ``print`` can be detected
and replaced reliably and non-ambiguously by an automated tool, so
More information about the Python-checkins
mailing list