Skip to content

Commit cdfe910

Browse files
lelitMariatta
authored andcommitted
Extending Python Doc minor updates (GH-4518)
Move footnote markers to be closer to the related terminology: before the end of the sentence, instead of after.
1 parent 3df02db commit cdfe910

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Doc/extending/extending.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ A Simple Example
4040

4141
Let's create an extension module called ``spam`` (the favorite food of Monty
4242
Python fans...) and let's say we want to create a Python interface to the C
43-
library function :c:func:`system`. [#]_ This function takes a null-terminated
43+
library function :c:func:`system` [#]_. This function takes a null-terminated
4444
character string as argument and returns an integer. We want this function to
4545
be callable from Python as follows::
4646

@@ -917,7 +917,7 @@ It is also possible to :dfn:`borrow` [#]_ a reference to an object. The
917917
borrower of a reference should not call :c:func:`Py_DECREF`. The borrower must
918918
not hold on to the object longer than the owner from which it was borrowed.
919919
Using a borrowed reference after the owner has disposed of it risks using freed
920-
memory and should be avoided completely. [#]_
920+
memory and should be avoided completely [#]_.
921921

922922
The advantage of borrowing over owning a reference is that you don't need to
923923
take care of disposing of the reference on all possible paths through the code
@@ -1088,7 +1088,7 @@ checking.
10881088

10891089
The C function calling mechanism guarantees that the argument list passed to C
10901090
functions (``args`` in the examples) is never *NULL* --- in fact it guarantees
1091-
that it is always a tuple. [#]_
1091+
that it is always a tuple [#]_.
10921092

10931093
It is a severe error to ever let a *NULL* pointer "escape" to the Python user.
10941094

Doc/extending/newtypes.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ Fortunately, Python's cyclic-garbage collector will eventually figure out that
659659
the list is garbage and free it.
660660

661661
In the second version of the :class:`Noddy` example, we allowed any kind of
662-
object to be stored in the :attr:`first` or :attr:`last` attributes. [#]_ This
662+
object to be stored in the :attr:`first` or :attr:`last` attributes [#]_. This
663663
means that :class:`Noddy` objects can participate in cycles::
664664

665665
>>> import noddy2

0 commit comments

Comments
 (0)