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

Skip to content

Commit 18d8d5a

Browse files
committed
Fix minor usage and consistency nits.
1 parent 624c8af commit 18d8d5a

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Doc/ref/ref3.tex

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,9 +1145,10 @@ \subsection{Emulating sequence and mapping types\label{sequence-types}}
11451145
\method{__mul__()}, \method{__rmul__()} and \method{__imul__()} described
11461146
below; they should not define \method{__coerce__()} or other numerical
11471147
operators. It is recommended that both mappings and sequences
1148-
implement the \method{__contains__}, to allow efficient use of the
1149-
\code{in} operator; for mappings, \code{in} should be equivalent of
1150-
\method{has_key()}; for sequences, it should search through the values.
1148+
implement the \method{__contains__()} method to allow efficient use of
1149+
the \code{in} operator; for mappings, \code{in} should be equivalent
1150+
of \method{has_key()}; for sequences, it should search through the
1151+
values.
11511152
\withsubitem{(mapping object method)}{
11521153
\ttindex{keys()}
11531154
\ttindex{values()}
@@ -1310,7 +1311,7 @@ \subsection{Additional methods for emulation of sequence types
13101311
Calling \code{max(0, i)} conveniently returns the proper value.
13111312

13121313
The membership test operators (\keyword{in} and \keyword{not in}) are
1313-
normally implemented as iteration loop through the sequence. However,
1314+
normally implemented as an iteration through the sequence. However,
13141315
sequence objects can supply the following special method with a more
13151316
efficient implementation:
13161317

0 commit comments

Comments
 (0)