summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew/3.0.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-01-15 17:03:02 (GMT)
committerGeorg Brandl <georg@python.org>2011-01-15 17:03:02 (GMT)
commit375aec2315a497562c7ccb0baf12493090d0faf5 (patch)
tree77662f734ac17128f0614719f79ae04b4c978473 /Doc/whatsnew/3.0.rst
parent6dc50f34ddb8a5c3b11570575348c9b94919b024 (diff)
downloadcpython-375aec2315a497562c7ccb0baf12493090d0faf5.zip
cpython-375aec2315a497562c7ccb0baf12493090d0faf5.tar.gz
cpython-375aec2315a497562c7ccb0baf12493090d0faf5.tar.bz2
Fix a few doc errors, mostly undefined keywords.
Diffstat (limited to 'Doc/whatsnew/3.0.rst')
-rw-r--r--Doc/whatsnew/3.0.rst17
1 files changed, 8 insertions, 9 deletions
diff --git a/Doc/whatsnew/3.0.rst b/Doc/whatsnew/3.0.rst
index b7f7233..852f811 100644
--- a/Doc/whatsnew/3.0.rst
+++ b/Doc/whatsnew/3.0.rst
@@ -96,9 +96,9 @@ up if you're used to Python 2.5.
Print Is A Function
-------------------
-The :keyword:`print` statement has been replaced with a :func:`print`
+The ``print`` statement has been replaced with a :func:`print`
function, with keyword arguments to replace most of the special syntax
-of the old :keyword:`print` statement (:pep:`3105`). Examples::
+of the old ``print`` statement (:pep:`3105`). Examples::
Old: print "The answer is", 2*2
New: print("The answer is", 2*2)
@@ -126,7 +126,7 @@ which produces::
Note:
* The :func:`print` function doesn't support the "softspace" feature of
- the old :keyword:`print` statement. For example, in Python 2.x,
+ the old ``print`` statement. For example, in Python 2.x,
``print "A\n", "B"`` would write ``"A\nB\n"``; but in Python 3.0,
``print("A\n", "B")`` writes ``"A\n B\n"``.
@@ -135,7 +135,7 @@ Note:
``print(x)`` instead!
* When using the ``2to3`` source-to-source conversion tool, all
- :keyword:`print` statements are automatically converted to
+ ``print`` statements are automatically converted to
:func:`print` function calls, so this is mostly a non-issue for
larger projects.
@@ -178,7 +178,7 @@ Python 3.0 has simplified the rules for ordering comparisons:
meaningful natural ordering. Thus, expressions like ``1 < ''``, ``0
> None`` or ``len <= len`` are no longer valid, and e.g. ``None <
None`` raises :exc:`TypeError` instead of returning
- :keyword:`False`. A corollary is that sorting a heterogeneous list
+ ``False``. A corollary is that sorting a heterogeneous list
no longer makes sense -- all the elements must be comparable to each
other. Note that this does not apply to the ``==`` and ``!=``
operators: objects of different incomparable types always compare
@@ -397,9 +397,8 @@ Changed Syntax
* :keyword:`as` and :keyword:`with` are now reserved words. (Since
2.6, actually.)
-* :keyword:`True`, :keyword:`False`, and :keyword:`None` are reserved
- words. (2.6 partially enforced the restrictions on :keyword:`None`
- already.)
+* ``True``, ``False``, and ``None`` are reserved words. (2.6 partially enforced
+ the restrictions on ``None`` already.)
* Change from :keyword:`except` *exc*, *var* to
:keyword:`except` *exc* :keyword:`as` *var*. See :pep:`3110`.
@@ -906,7 +905,7 @@ best strategy is the following:
It is not recommended to try to write source code that runs unchanged
under both Python 2.6 and 3.0; you'd have to use a very contorted
-coding style, e.g. avoiding :keyword:`print` statements, metaclasses,
+coding style, e.g. avoiding ``print`` statements, metaclasses,
and much more. If you are maintaining a library that needs to support
both Python 2.6 and Python 3.0, the best approach is to modify step 3
above by editing the 2.6 version of the source code and running the