@@ -37,7 +37,7 @@ object.
37
37
38
38
This sort of thing can only be explained by example, so here's a minimal, but
39
39
complete, module that defines a new type named :class: `Custom ` inside a C
40
- extension module :mod: `custom `:
40
+ extension module :mod: `! custom `:
41
41
42
42
.. note ::
43
43
What we're showing here is the traditional way of defining *static *
@@ -55,7 +55,7 @@ from the previous chapter. This file defines three things:
55
55
#. How the :class: `Custom ` **type ** behaves: this is the ``CustomType `` struct,
56
56
which defines a set of flags and function pointers that the interpreter
57
57
inspects when specific operations are requested.
58
- #. How to initialize the :mod: `custom ` module: this is the ``PyInit_custom ``
58
+ #. How to initialize the :mod: `! custom ` module: this is the ``PyInit_custom ``
59
59
function and the associated ``custommodule `` struct.
60
60
61
61
The first bit is::
@@ -127,7 +127,7 @@ our objects and in some error messages, for example:
127
127
TypeError: can only concatenate str (not "custom.Custom") to str
128
128
129
129
Note that the name is a dotted name that includes both the module name and the
130
- name of the type within the module. The module in this case is :mod: `custom ` and
130
+ name of the type within the module. The module in this case is :mod: `! custom ` and
131
131
the type is :class: `Custom `, so we set the type name to :class: `custom.Custom `.
132
132
Using the real dotted import path is important to make your type compatible
133
133
with the :mod: `pydoc ` and :mod: `pickle ` modules. ::
@@ -231,7 +231,7 @@ Adding data and methods to the Basic example
231
231
============================================
232
232
233
233
Let's extend the basic example to add some data and methods. Let's also make
234
- the type usable as a base class. We'll create a new module, :mod: `custom2 ` that
234
+ the type usable as a base class. We'll create a new module, :mod: `! custom2 ` that
235
235
adds these capabilities:
236
236
237
237
.. literalinclude :: ../includes/custom2.c
0 commit comments