summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2012-03-05 15:43:41 (GMT)
committerÉric Araujo <merwok@netwok.org>2012-03-05 15:43:41 (GMT)
commit76c6aa860ce86486617f51df494e03e4d8633564 (patch)
tree7b589476617a28663da160e9b01947f9686a5451
parent47546e6e3dfbfb75d5df3abd9ef47d9892cb71f6 (diff)
downloadcpython-76c6aa860ce86486617f51df494e03e4d8633564.zip
cpython-76c6aa860ce86486617f51df494e03e4d8633564.tar.gz
cpython-76c6aa860ce86486617f51df494e03e4d8633564.tar.bz2
Use source reST role instead of file where it makes sense.
source generates a nifty link to the Mercurial web viewer.
-rw-r--r--Doc/howto/cporting.rst4
-rw-r--r--Doc/howto/regex.rst4
2 files changed, 4 insertions, 4 deletions
diff --git a/Doc/howto/cporting.rst b/Doc/howto/cporting.rst
index 98db9dd..bea2153 100644
--- a/Doc/howto/cporting.rst
+++ b/Doc/howto/cporting.rst
@@ -261,8 +261,8 @@ behave slightly differently from real Capsules. Specifically:
copy as you see fit.)
You can find :file:`capsulethunk.h` in the Python source distribution
-in the :file:`Doc/includes` directory. We also include it here for
-your reference; here is :file:`capsulethunk.h`:
+as :source:`Doc/includes/capsulethunk.h`. We also include it here for
+your convenience:
.. literalinclude:: ../includes/capsulethunk.h
diff --git a/Doc/howto/regex.rst b/Doc/howto/regex.rst
index 1523c48..d56be21 100644
--- a/Doc/howto/regex.rst
+++ b/Doc/howto/regex.rst
@@ -365,7 +365,7 @@ and more.
You can learn about this by interactively experimenting with the :mod:`re`
module. If you have Tkinter available, you may also want to look at
-:file:`Tools/scripts/redemo.py`, a demonstration program included with the
+:source:`Tools/scripts/redemo.py`, a demonstration program included with the
Python distribution. It allows you to enter REs and strings, and displays
whether the RE matches or fails. :file:`redemo.py` can be quite useful when
trying to debug a complicated RE. Phil Schwartz's `Kodos
@@ -501,7 +501,7 @@ more convenient. If a program contains a lot of regular expressions, or re-uses
the same ones in several locations, then it might be worthwhile to collect all
the definitions in one place, in a section of code that compiles all the REs
ahead of time. To take an example from the standard library, here's an extract
-from :file:`xmllib.py`::
+from the deprecated :mod:`xmllib` module::
ref = re.compile( ... )
entityref = re.compile( ... )