mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 11:49:12 +00:00 
			
		
		
		
	Use source reST role instead of file where it makes sense.
source generates a nifty link to the Mercurial web viewer.
This commit is contained in:
		
							parent
							
								
									d3899e320f
								
							
						
					
					
						commit
						fdfaf0aba2
					
				
					 2 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
					@ -261,8 +261,8 @@ behave slightly differently from real Capsules.  Specifically:
 | 
				
			||||||
    copy as you see fit.)
 | 
					    copy as you see fit.)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
You can find :file:`capsulethunk.h` in the Python source distribution
 | 
					You can find :file:`capsulethunk.h` in the Python source distribution
 | 
				
			||||||
in the :file:`Doc/includes` directory.  We also include it here for
 | 
					as :source:`Doc/includes/capsulethunk.h`.  We also include it here for
 | 
				
			||||||
your reference; here is :file:`capsulethunk.h`:
 | 
					your convenience:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.. literalinclude:: ../includes/capsulethunk.h
 | 
					.. literalinclude:: ../includes/capsulethunk.h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -360,7 +360,7 @@ and more.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
You can learn about this by interactively experimenting with the :mod:`re`
 | 
					You can learn about this by interactively experimenting with the :mod:`re`
 | 
				
			||||||
module.  If you have :mod:`tkinter` available, you may also want to look at
 | 
					module.  If you have :mod:`tkinter` available, you may also want to look at
 | 
				
			||||||
:file:`Tools/demo/redemo.py`, a demonstration program included with the
 | 
					:source:`Tools/demo/redemo.py`, a demonstration program included with the
 | 
				
			||||||
Python distribution.  It allows you to enter REs and strings, and displays
 | 
					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
 | 
					whether the RE matches or fails. :file:`redemo.py` can be quite useful when
 | 
				
			||||||
trying to debug a complicated RE.  Phil Schwartz's `Kodos
 | 
					trying to debug a complicated RE.  Phil Schwartz's `Kodos
 | 
				
			||||||
| 
						 | 
					@ -495,7 +495,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 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
 | 
					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
 | 
					ahead of time.  To take an example from the standard library, here's an extract
 | 
				
			||||||
from the now deprecated :file:`xmllib.py`::
 | 
					from the now-defunct Python 2 standard :mod:`xmllib` module::
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   ref = re.compile( ... )
 | 
					   ref = re.compile( ... )
 | 
				
			||||||
   entityref = re.compile( ... )
 | 
					   entityref = re.compile( ... )
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue