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

Skip to content

Commit b3dfc0a

Browse files
committed
- fix typo report by email, only 1.5 years late
- fix several consistency nits relating to \method{...()}
1 parent 4655e44 commit b3dfc0a

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Doc/ref/ref3.tex

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ \section{The standard type hierarchy\label{types}}
326326
\function{ord()}\bifuncindex{ord} convert between code units and
327327
nonnegative integers representing the Unicode ordinals as defined in
328328
the Unicode Standard 3.0. Conversion from and to other encodings are
329-
possible through the Unicode method \method{encode} and the built-in
329+
possible through the Unicode method \method{encode()} and the built-in
330330
function \function{unicode()}.\bifuncindex{unicode}
331331
\obindex{unicode}
332332
\index{character}
@@ -1208,8 +1208,8 @@ \subsection{Basic customization\label{customization}}
12081208

12091209
There are no implied relationships among the comparison operators.
12101210
The truth of \code{\var{x}==\var{y}} does not imply that \code{\var{x}!=\var{y}}
1211-
is false. Accordingly, when defining \method{__eq__}, one should also
1212-
define \method{__ne__} so that the operators will behave as expected.
1211+
is false. Accordingly, when defining \method{__eq__()}, one should also
1212+
define \method{__ne__()} so that the operators will behave as expected.
12131213

12141214
There are no reflected (swapped-argument) versions of these methods
12151215
(to be used when the left argument does not support the operation but
@@ -1338,7 +1338,7 @@ \subsubsection{More attribute access for new-style classes \label{new-style-attr
13381338

13391339
\begin{methoddesc}[object]{__getattribute__}{self, name}
13401340
Called unconditionally to implement attribute accesses for instances
1341-
of the class. If the class also defines \method{__getattr__}, the latter
1341+
of the class. If the class also defines \method{__getattr__()}, the latter
13421342
will not be called unless \method{__getattribute__()} either calls it
13431343
explicitly or raises an \exception{AttributeError}.
13441344
This method should return the (computed) attribute
@@ -1905,7 +1905,7 @@ \subsection{Emulating numeric types\label{numeric-types}}
19051905
\var{x}\code{+=}\var{y}, where \var{x} is an instance of a class that
19061906
has an \method{__iadd__()} method, \code{\var{x}.__iadd__(\var{y})} is
19071907
called. If \var{x} is an instance of a class that does not define a
1908-
\method{__iadd()} method, \code{\var{x}.__add__(\var{y})} and
1908+
\method{__iadd__()} method, \code{\var{x}.__add__(\var{y})} and
19091909
\code{\var{y}.__radd__(\var{x})} are considered, as with the
19101910
evaluation of \var{x}\code{+}\var{y}.
19111911
\end{methoddesc}
@@ -1988,10 +1988,10 @@ \subsection{Coercion rules\label{coercion-rules}}
19881988

19891989
Below, \method{__op__()} and \method{__rop__()} are used to signify
19901990
the generic method names corresponding to an operator;
1991-
\method{__iop__} is used for the corresponding in-place operator. For
1991+
\method{__iop__()} is used for the corresponding in-place operator. For
19921992
example, for the operator `\code{+}', \method{__add__()} and
19931993
\method{__radd__()} are used for the left and right variant of the
1994-
binary operator, and \method{__iadd__} for the in-place variant.
1994+
binary operator, and \method{__iadd__()} for the in-place variant.
19951995

19961996
\item
19971997

0 commit comments

Comments
 (0)