@@ -378,7 +378,7 @@ be to let the user write code like this::
378
378
379
379
The transaction should be committed if the code in the block runs flawlessly or
380
380
rolled 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::
382
382
383
383
class DatabaseConnection:
384
384
# Database interface
@@ -1256,16 +1256,16 @@ metaclass in a class definition::
1256
1256
...
1257
1257
1258
1258
1259
- In the :class: ` Drawable ` ABC above, the :meth: ` draw_doubled ` method
1259
+ In the `` Drawable `` ABC above, the `` draw_doubled ` ` method
1260
1260
renders 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
1262
1262
this 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
1265
1265
a useful generic implementation.
1266
1266
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
1269
1269
exception for classes that don't define the method.
1270
1270
Note that the exception is only raised when you actually
1271
1271
try to create an instance of a subclass lacking the method::
@@ -1289,7 +1289,7 @@ Abstract data attributes can be declared using the
1289
1289
def readonly(self):
1290
1290
return self._x
1291
1291
1292
- Subclasses must then define a :meth: ` readonly ` property.
1292
+ Subclasses must then define a `` readonly ` ` property.
1293
1293
1294
1294
.. seealso ::
1295
1295
0 commit comments