Skip to content

Commit

Permalink
Fix __file__ handling with new Sphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
ambv committed Oct 10, 2024
1 parent ebfdffa commit b8882a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions developer-workflow/extension-modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Extension modules can be classified into two categories:

* A *built-in* extension module is a module built and shipped with
the Python interpreter. A built-in module is *statically* linked
into the interpreter, thereby lacking a :attr:`__file__` attribute.
into the interpreter, thereby lacking a ``__file__`` attribute.

.. seealso:: :data:`sys.builtin_module_names` --- names of built-in modules.

Expand All @@ -41,7 +41,7 @@ Extension modules can be classified into two categories:
* A *shared* (or *dynamic*) extension module is built as a shared library
(``.so`` or ``.dll`` file) and is *dynamically* linked into the interpreter.

In particular, the module's :attr:`__file__` attribute contains the path
In particular, the module's ``__file__`` attribute contains the path
to the ``.so`` or ``.dll`` file.

Shared modules are built with the :c:macro:`!Py_BUILD_CORE_MODULE`
Expand Down

0 comments on commit b8882a9

Please sign in to comment.