Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2619c9e

Browse files
committed
SF patch #838938: Typos in the docs (Extending/Embedding + Python/C API)
(Contributed by Florent Rougon.)
1 parent e3d5f98 commit 2619c9e

4 files changed

Lines changed: 8 additions & 9 deletions

File tree

Doc/api/abstract.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ \section{Object Protocol \label{object}}
267267
\begin{cfuncdesc}{PyObject*}{PyObject_CallMethod}{PyObject *o,
268268
char *method, char *format,
269269
\moreargs}
270-
Call the method named \var{m} of object \var{o} with a variable
270+
Call the method named \var{method} of object \var{o} with a variable
271271
number of C arguments. The C arguments are described by a
272272
\cfunction{Py_BuildValue()} format string. The format may be \NULL,
273273
indicating that no arguments are provided. Returns the result of the

Doc/api/exceptions.tex

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,8 @@ \chapter{Exception Handling \label{exceptionHandling}}
331331
example, when an exception occurs in an \method{__del__()} method.
332332

333333
The function is called with a single argument \var{obj} that
334-
identifies where the context in which the unraisable exception
335-
occurred. The repr of \var{obj} will be printed in the warning
336-
message.
334+
identifies the context in which the unraisable exception occurred.
335+
The repr of \var{obj} will be printed in the warning message.
337336
\end{cfuncdesc}
338337

339338
\section{Standard Exceptions \label{standardExceptions}}

Doc/api/newtypes.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ \section{Common Object Structures \label{common-structs}}
166166
This is a macro which expands to the declarations of the fields of
167167
the \ctype{PyObject} type; it is used when declaring new types which
168168
represent objects without a varying length. The specific fields it
169-
expands to depends on the definition of
169+
expands to depend on the definition of
170170
\csimplemacro{Py_TRACE_REFS}. By default, that macro is not
171171
defined, and \csimplemacro{PyObject_HEAD} expands to:
172172
\begin{verbatim}
@@ -397,7 +397,7 @@ \section{Type Objects \label{type-structs}}
397397
This should be done before any instances of the type are created.
398398
\cfunction{PyType_Ready()} checks if \member{ob_type} is \NULL, and
399399
if so, initializes it: in Python 2.2, it is set to
400-
\code{\&PyType_Type}; in Python 2.2.1 and later it will be
400+
\code{\&PyType_Type}; in Python 2.2.1 and later it is
401401
initialized to the \member{ob_type} field of the base class.
402402
\cfunction{PyType_Ready()} will not change this field if it is
403403
non-zero.
@@ -704,7 +704,7 @@ \section{Type Objects \label{type-structs}}
704704
\end{cmemberdesc}
705705

706706
\begin{cmemberdesc}{PyTypeObject}{PyBufferProcs*}{tp_as_buffer}
707-
Pointer to an additional structure contains fields relevant only to
707+
Pointer to an additional structure that contains fields relevant only to
708708
objects which implement the buffer interface. These fields are
709709
documented in ``Buffer Object Structures'' (section
710710
\ref{buffer-structs}).

Doc/ext/newtypes.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ \subsection{Adding data and methods to the Basic example}
537537
Noddy_methods, /* tp_methods */
538538
\end{verbatim}
539539

540-
Note that used the \constant{METH_NOARGS} flag to indicate that the
540+
Note that we used the \constant{METH_NOARGS} flag to indicate that the
541541
method is passed no arguments.
542542

543543
Finally, we'll make our type usable as a base class. We've written
@@ -683,7 +683,7 @@ \subsection{Supporting cyclic garbage collection}
683683
\end{verbatim}
684684

685685
In this example, we create a list that contains itself. When we delete
686-
it, it still has a reference from itself. It's reference count doesn't
686+
it, it still has a reference from itself. Its reference count doesn't
687687
drop to zero. Fortunately, Python's cyclic-garbage collector will
688688
eventually figure out that the list is garbage and free it.
689689

0 commit comments

Comments
 (0)