[Python-checkins] cpython (3.2): #17256: fix syntax highlight in embedding example. Patch by Kushal Das.

ezio.melotti python-checkins at python.org
Fri Feb 22 06:53:42 CET 2013


http://hg.python.org/cpython/rev/b42e7aeb4235
changeset:   82314:b42e7aeb4235
branch:      3.2
parent:      82309:c0581f7be196
user:        Ezio Melotti <ezio.melotti at gmail.com>
date:        Fri Feb 22 07:46:22 2013 +0200
summary:
  #17256: fix syntax highlight in embedding example.  Patch by Kushal Das.

files:
  Doc/extending/embedding.rst |  12 +++++++++---
  1 files changed, 9 insertions(+), 3 deletions(-)


diff --git a/Doc/extending/embedding.rst b/Doc/extending/embedding.rst
--- a/Doc/extending/embedding.rst
+++ b/Doc/extending/embedding.rst
@@ -138,7 +138,9 @@
 in ``argv[2]``.  Its integer arguments are the other values of the ``argv``
 array.  If you :ref:`compile and link <compiling>` this program (let's call
 the finished executable :program:`call`), and use it to execute a Python
-script, such as::
+script, such as:
+
+.. code-block:: python
 
    def multiply(a,b):
        print("Will compute", a, "times", b)
@@ -238,7 +240,9 @@
 
 These two lines initialize the ``numargs`` variable, and make the
 :func:`emb.numargs` function accessible to the embedded Python interpreter.
-With these extensions, the Python script can do things like ::
+With these extensions, the Python script can do things like
+
+.. code-block:: python
 
    import emb
    print("Number of arguments", emb.numargs())
@@ -303,7 +307,9 @@
 to find its location) and compilation
 options.  In this case, the :mod:`sysconfig` module is a useful tool to
 programmatically extract the configuration values that you will want to
-combine together::
+combine together:
+
+.. code-block:: python
 
    >>> import sysconfig
    >>> sysconfig.get_config_var('LINKFORSHARED')

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list