File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1145,9 +1145,10 @@ \subsection{Emulating sequence and mapping types\label{sequence-types}}
11451145\method {__mul__()}, \method {__rmul__()} and \method {__imul__()} described
11461146below; they should not define \method {__coerce__()} or other numerical
11471147operators. 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
13101311Calling \code {max(0, i)} conveniently returns the proper value.
13111312
13121313The 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,
13141315sequence objects can supply the following special method with a more
13151316efficient implementation:
13161317
You can’t perform that action at this time.
0 commit comments