Clarify backwards compatibility.

This commit is contained in:
Guido van Rossum 2007-10-12 20:25:27 +00:00
parent 7ecd06cd4d
commit b9cf35b82a
1 changed files with 16 additions and 2 deletions

View File

@ -93,9 +93,23 @@ Backwards Compatibility
=======================
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