@@ -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- :class: ` DatabaseConnection ` that I'll assume::
381+ `` DatabaseConnection ` ` that I'll assume::
382382
383383 class DatabaseConnection:
384384 # Database interface
@@ -1256,16 +1256,16 @@ metaclass in a class definition::
12561256 ...
12571257
12581258
1259- In the :class: ` Drawable ` ABC above, the :meth: ` draw_doubled ` method
1259+ In the `` Drawable `` ABC above, the `` draw_doubled ` ` method
12601260renders the object at twice its size and can be implemented in terms
1261- of other methods described in :class: ` Drawable `. Classes implementing
1261+ of other methods described in `` Drawable ` `. Classes implementing
12621262this ABC therefore don't need to provide their own implementation
1263- of :meth: ` draw_doubled `, though they can do so. An implementation
1264- of :meth: ` draw ` is necessary, though; the ABC can't provide
1263+ of `` draw_doubled ` `, though they can do so. An implementation
1264+ of `` draw ` ` is necessary, though; the ABC can't provide
12651265a useful generic implementation.
12661266
1267- You can apply the `` @ abstractmethod` ` decorator to methods such as
1268- :meth: ` draw ` that must be implemented; Python will then raise an
1267+ You can apply the :func: ` ~abc. abstractmethod ` decorator to methods such as
1268+ `` draw ` ` that must be implemented; Python will then raise an
12691269exception for classes that don't define the method.
12701270Note that the exception is only raised when you actually
12711271try to create an instance of a subclass lacking the method::
@@ -1289,7 +1289,7 @@ Abstract data attributes can be declared using the
12891289 def readonly(self):
12901290 return self._x
12911291
1292- Subclasses must then define a :meth: ` readonly ` property.
1292+ Subclasses must then define a `` readonly ` ` property.
12931293
12941294.. seealso ::
12951295
0 commit comments