@@ -307,7 +307,7 @@ The :mod:`threading` module's locks and condition variables  also support the
307307The lock is acquired before the block is executed and always released once  the
308308block is complete.
309309
310- The :func: `decimal.localcontext ` function in the :mod: `decimal ` module makes
310+ The :func: `~ decimal.localcontext ` function in the :mod: `decimal ` module makes
311311it easy to save and restore the current decimal context, which encapsulates
312312the desired precision and rounding characteristics for computations::
313313
@@ -378,7 +378,7 @@ be to let the user write code like this::
378378
379379The transaction should be committed if the code in the block runs flawlessly or
380380rolled back if there's an exception. Here's the basic interface for
381- `` DatabaseConnection ` ` that I'll assume::
381+ :class: ` ! DatabaseConnection ` that I'll assume::
382382
383383   class DatabaseConnection: 
384384       # Database interface 
@@ -627,7 +627,8 @@ Two other classes, :class:`~multiprocessing.pool.Pool` and
627627processes, and requests can then be distributed to the workers by calling
628628:meth: `~multiprocessing.pool.Pool.apply ` or
629629:meth: `~multiprocessing.pool.Pool.apply_async ` to add a single request, and
630- :meth: `map ` or :meth: `~multiprocessing.pool.Pool.map_async ` to add a number of
630+ :meth: `~multiprocessing.pool.Pool.map ` or
631+ :meth: `~multiprocessing.pool.Pool.map_async ` to add a number of
631632requests.  The following code uses a :class: `~multiprocessing.pool.Pool ` to
632633spread requests across 5 worker processes and retrieve a list of results::
633634
@@ -831,7 +832,7 @@ documentation for a :ref:`complete list <formatstrings>`; here's a sample:
831832      format, followed by a percent sign.
832833===== ======================================================================== 
833834
834- Classes and types can define a `` __format__ ` ` method to control how they're
835+ Classes and types can define a :meth: ` ~object. __format__ ` method to control how they're
835836formatted.  It receives a single argument, the format specifier::
836837
837838   def __format__(self, format_spec): 
@@ -841,7 +842,7 @@ formatted.  It receives a single argument, the format specifier::
841842           return str(self) 
842843
843844There's also a :func: `format ` builtin that will format a single
844- value.  It calls the type's `` __format__ ` ` method with the
845+ value.  It calls the type's :meth: ` ~object. __format__ ` method with the
845846provided specifier::
846847
847848    >>> format(75.6564, '.2f') 
@@ -1036,8 +1037,8 @@ PEP 3116: New I/O Library
10361037
10371038Python's built-in file objects support a number of methods, but
10381039file-like objects don't necessarily support all of them.  Objects that
1039- imitate files usually support :meth: `~io.TextIOBase. read ` and
1040- :meth: `~io.TextIOBase. write `, but they may not support :meth: `readline `,
1040+ imitate files usually support :meth: `! read ` and
1041+ :meth: `! write `, but they may not support :meth: `! readline `,
10411042for example.  Python 3.0 introduces a layered I/O library in the :mod: `io `
10421043module that separates buffering and text-handling features from the
10431044fundamental read and write operations.
@@ -1265,16 +1266,16 @@ metaclass in a class definition::
12651266            ... 
12661267
12671268
1268- In the `` Drawable ``  ABC above, the `` draw_doubled ` ` method
1269+ In the :class: ` ! Drawable ` ABC above, the :meth: ` ! draw_doubled ` method
12691270renders the object at twice its size and can be implemented in terms
1270- of other methods described in `` Drawable ` `.  Classes implementing
1271+ of other methods described in :class: ` ! Drawable `.  Classes implementing
12711272this ABC therefore don't need to provide their own implementation
1272- of `` draw_doubled ` `, though they can do so.  An implementation
1273- of `` draw ` ` is necessary, though; the ABC can't provide
1273+ of :meth: ` ! draw_doubled `, though they can do so.  An implementation
1274+ of :meth: ` ! draw ` is necessary, though; the ABC can't provide
12741275a useful generic implementation.
12751276
1276- You can apply the :func : `~abc.abstractmethod ` decorator to methods such as
1277- `` draw ` ` that must be implemented; Python will then raise an
1277+ You can apply the :deco : `~abc.abstractmethod ` decorator to methods such as
1278+ :meth: ` ! draw ` that must be implemented; Python will then raise an
12781279exception for classes that don't define the method.
12791280Note that the exception is only raised when you actually
12801281try to create an instance of a subclass lacking the method::
0 commit comments