summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-07-29 01:49:37 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-07-29 01:49:37 (GMT)
commit6a09315ff098224da138ff708e470ebc1c0ba8ac (patch)
treee21713f5da3e25fa00aaf284c51273d2acde2884 /Doc/reference
parent10ea19f69c0bdb2c47aaa29c62dcb1f41825a3dc (diff)
parent1050d2d0c7730c6c533246bb2404937739a7775c (diff)
downloadcpython-6a09315ff098224da138ff708e470ebc1c0ba8ac.zip
cpython-6a09315ff098224da138ff708e470ebc1c0ba8ac.tar.gz
cpython-6a09315ff098224da138ff708e470ebc1c0ba8ac.tar.bz2
Issue #26462: Merge code block fixes from 3.5
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/expressions.rst4
-rw-r--r--Doc/reference/lexical_analysis.rst17
2 files changed, 16 insertions, 5 deletions
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst
index f508eaa..eafd70a 100644
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -1406,7 +1406,9 @@ Lambdas
Lambda expressions (sometimes called lambda forms) are used to create anonymous
functions. The expression ``lambda arguments: expression`` yields a function
-object. The unnamed object behaves like a function object defined with ::
+object. The unnamed object behaves like a function object defined with:
+
+.. code-block:: none
def <lambda>(arguments):
return expression
diff --git a/Doc/reference/lexical_analysis.rst b/Doc/reference/lexical_analysis.rst
index 7af1b28..b3b71af 100644
--- a/Doc/reference/lexical_analysis.rst
+++ b/Doc/reference/lexical_analysis.rst
@@ -794,7 +794,10 @@ Operators
.. index:: single: operators
-The following tokens are operators::
+The following tokens are operators:
+
+.. code-block:: none
+
+ - * ** / // % @
<< >> & | ^ ~
@@ -808,7 +811,9 @@ Delimiters
.. index:: single: delimiters
-The following tokens serve as delimiters in the grammar::
+The following tokens serve as delimiters in the grammar:
+
+.. code-block:: none
( ) [ ] { }
, : . ; @ = ->
@@ -821,12 +826,16 @@ of the list, the augmented assignment operators, serve lexically as delimiters,
but also perform an operation.
The following printing ASCII characters have special meaning as part of other
-tokens or are otherwise significant to the lexical analyzer::
+tokens or are otherwise significant to the lexical analyzer:
+
+.. code-block:: none
' " # \
The following printing ASCII characters are not used in Python. Their
-occurrence outside string literals and comments is an unconditional error::
+occurrence outside string literals and comments is an unconditional error:
+
+.. code-block:: none
$ ? `