summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-12-05 18:31:51 (GMT)
committerGeorg Brandl <georg@python.org>2008-12-05 18:31:51 (GMT)
commitbadc7abc102e1b5c3c83e7763162f25bb5574aeb (patch)
tree224eec5513c74b1691ec6cd83d38b4a5ff9b0ad7 /Doc
parentd3c827b0bd8facbe9798893c691dbcc31db20d88 (diff)
downloadcpython-badc7abc102e1b5c3c83e7763162f25bb5574aeb.zip
cpython-badc7abc102e1b5c3c83e7763162f25bb5574aeb.tar.gz
cpython-badc7abc102e1b5c3c83e7763162f25bb5574aeb.tar.bz2
Use :samp: role.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/whatsnew/3.0.rst13
1 files changed, 6 insertions, 7 deletions
diff --git a/Doc/whatsnew/3.0.rst b/Doc/whatsnew/3.0.rst
index a5f8f8f..3e4188f 100644
--- a/Doc/whatsnew/3.0.rst
+++ b/Doc/whatsnew/3.0.rst
@@ -369,7 +369,7 @@ New Syntax
(a, *rest, b) = range(5)
- This sets *a* to ``0``, *b* to ``4``, and \*rest to ``[1, 2, 3]``.
+ This sets *a* to ``0``, *b* to ``4``, and *rest* to ``[1, 2, 3]``.
* Dictionary comprehensions: ``{k: v for k, v in stuff}`` means the
same thing as ``dict(stuff)`` but is more flexible. (This is
@@ -393,7 +393,7 @@ Changed Syntax
--------------
* :pep:`3109` and :pep:`3134`: new :keyword:`raise` statement syntax:
- ``raise [expr [from expr]]``. See below.
+ :samp:`raise [{expr} [from {expr}]]`. See below.
* :keyword:`as` and :keyword:`with` are now reserved words. (Since
2.6, actually.)
@@ -422,8 +422,8 @@ Changed Syntax
:class:`object`.)
* List comprehensions no longer support the syntactic form
- ``[... for var in item1, item2, ...]``. Use
- ``[... for var in (item1, item2, ...)]`` instead.
+ :samp:`[... for {var} in {item1}, {item2}, ...]`. Use
+ :samp:`[... for {var} in ({item1}, {item2}, ...)]` instead.
Also note that list comprehensions have different semantics: they
are closer to syntactic sugar for a generator expression inside a
:func:`list` constructor, and in particular the loop control
@@ -457,9 +457,8 @@ Removed Syntax
* The :keyword:`from` *module* :keyword:`import` ``*`` syntax is only
allowed at the module level, no longer inside functions.
-* The only acceptable syntax for relative imports is :keyword:`from`
- ``.`` [*module*] :keyword:`import` *name*.
- All :keyword:`import` forms not starting with ``.`` are
+* The only acceptable syntax for relative imports is :samp:`from .[{module}]
+ import {name}`. All :keyword:`import` forms not starting with ``.`` are
interpreted as absolute imports. (:pep:`0328`)
* Classic classes are gone.