summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-07-26 09:18:21 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-07-26 09:18:21 (GMT)
commit1050d2d0c7730c6c533246bb2404937739a7775c (patch)
tree68d901cd196aead4df7c3b074ebf2df6e85678e7 /Doc/reference
parent87ec85f4208bf329e6454fd3e2639c613b2b61af (diff)
downloadcpython-1050d2d0c7730c6c533246bb2404937739a7775c.zip
cpython-1050d2d0c7730c6c533246bb2404937739a7775c.tar.gz
cpython-1050d2d0c7730c6c533246bb2404937739a7775c.tar.bz2
Issue #26462: Doc: reduce literal_block warnings, fix syntax highlighting.
Patch by Julien Palard.
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 71964d7..37f25f1 100644
--- a/Doc/reference/lexical_analysis.rst
+++ b/Doc/reference/lexical_analysis.rst
@@ -689,7 +689,10 @@ Operators
.. index:: single: operators
-The following tokens are operators::
+The following tokens are operators:
+
+.. code-block:: none
+
+ - * ** / // % @
<< >> & | ^ ~
@@ -703,7 +706,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
( ) [ ] { }
, : . ; @ = ->
@@ -716,12 +721,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
$ ? `