@@ -1045,7 +1045,7 @@ \subsection{Emulating sequence and mapping types\label{sequence-types}}
10451045sequence, or slice objects, which define a range of items. (For backwards
10461046compatibility, the method \method {__getslice__()} (see below) can also be
10471047defined to handle simple, but not extended slices.) It is also recommended
1048- that mappings provide methods \method {keys()}, \method {values()},
1048+ that mappings provide the methods \method {keys()}, \method {values()},
10491049\method {items()}, \method {has_key()}, \method {get()}, \method {clear()},
10501050\method {copy()}, and \method {update()} behaving similar to those for
10511051Python's standard dictionary objects; mutable sequences should provide
@@ -1132,6 +1132,8 @@ \subsection{Additional methods for emulation of sequence types
11321132three methods.
11331133
11341134\begin {methoddesc }[sequence object]{__getslice__}{self, i, j}
1135+ \deprecated {2.0}{Support slice objects as parameters to the
1136+ \method {__getitem__()} method.}
11351137Called to implement evaluation of \code {\var {self}[\var {i}:\var {j}]}.
11361138The returned object should be of the same type as \var {self}. Note
11371139that missing \var {i} or \var {j} in the slice expression are replaced
@@ -1142,7 +1144,7 @@ \subsection{Additional methods for emulation of sequence types
11421144No guarantee is made that indexes adjusted this way are not still
11431145negative. Indexes which are greater than the length of the sequence
11441146are not modified.
1145- This method is deprecated. If no \method {__getslice__()} is found, a slice
1147+ If no \method {__getslice__()} is found, a slice
11461148object is created instead, and passed to \method {__getitem__()} instead.
11471149\end {methoddesc }
11481150
0 commit comments