diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-09-06 03:00:00 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-09-06 03:00:00 (GMT) |
commit | ad2a9e72f122cb79cdd7bd78701b9209101b67f1 (patch) | |
tree | 6aa24e7241097918680eeab3f281b86602b5786a | |
parent | d5ff5b2ec4bec4e7177ba75ca16e4368414f5d56 (diff) | |
download | cpython-ad2a9e72f122cb79cdd7bd78701b9209101b67f1.zip cpython-ad2a9e72f122cb79cdd7bd78701b9209101b67f1.tar.gz cpython-ad2a9e72f122cb79cdd7bd78701b9209101b67f1.tar.bz2 |
actually tell the name of the flag to use
-rw-r--r-- | Doc/library/2to3.rst | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Doc/library/2to3.rst b/Doc/library/2to3.rst index f520401..e8ea861 100644 --- a/Doc/library/2to3.rst +++ b/Doc/library/2to3.rst @@ -42,7 +42,7 @@ original is also be made.) Writing the changes back is enabled with the $ 2to3 -w example.py -After transformation :file:`example.py` looks like this:: +After transformation, :file:`example.py` looks like this:: def greet(name): print("Hello, {0}!".format(name)) @@ -79,12 +79,12 @@ flag. Note that *only* doctests will be refactored. The :option:`-v` option enables the output of more information on the translation process. -2to3 can also treat ``print`` as a function instead of a statement in the -grammar. This is useful when ``from __future__ import print_function`` is being -used. If this option is not given, the print fixer will surround print calls in -an extra set of parentheses because it cannot differentiate between the and -print statement with parentheses (such as ``print ("a" + "b" + "c")``) and a -true function call. +When the :option:`-p` is passed to it, 2to3 treats ``print`` as a function +instead of a statement. This is useful when ``from __future__ import +print_function`` is being used. If this option is not given, the print fixer +will surround print calls in an extra set of parentheses because it cannot +differentiate between the and print statement with parentheses (such as ``print +("a" + "b" + "c")``) and a true function call. :mod:`lib2to3` - 2to3's library |