diff options
author | Fred Drake <fdrake@acm.org> | 2000-08-18 02:42:14 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-08-18 02:42:14 (GMT) |
commit | a00738259fff5e9ea20ba26a5c5d24c8e9215897 (patch) | |
tree | cb1f0aec404443d80dc1d33a002d502b9499b5ec /Doc/ref/ref3.tex | |
parent | 304faf944c702c67ca200b002b0fd7983caa0d2a (diff) | |
download | cpython-a00738259fff5e9ea20ba26a5c5d24c8e9215897.zip cpython-a00738259fff5e9ea20ba26a5c5d24c8e9215897.tar.gz cpython-a00738259fff5e9ea20ba26a5c5d24c8e9215897.tar.bz2 |
Adjust the way __getslice__() is marked as deprecated; this will also
stand out more.
Diffstat (limited to 'Doc/ref/ref3.tex')
-rw-r--r-- | Doc/ref/ref3.tex | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/ref/ref3.tex b/Doc/ref/ref3.tex index 98625a9..ec56d81 100644 --- a/Doc/ref/ref3.tex +++ b/Doc/ref/ref3.tex @@ -1045,7 +1045,7 @@ sequence, the allowable keys should be the integers \var{k} for which sequence, or slice objects, which define a range of items. (For backwards compatibility, the method \method{__getslice__()} (see below) can also be defined to handle simple, but not extended slices.) It is also recommended -that mappings provide methods \method{keys()}, \method{values()}, +that mappings provide the methods \method{keys()}, \method{values()}, \method{items()}, \method{has_key()}, \method{get()}, \method{clear()}, \method{copy()}, and \method{update()} behaving similar to those for Python's standard dictionary objects; mutable sequences should provide @@ -1132,6 +1132,8 @@ objects. Immutable sequences methods should only define three methods. \begin{methoddesc}[sequence object]{__getslice__}{self, i, j} +\deprecated{2.0}{Support slice objects as parameters to the +\method{__getitem__()} method.} Called to implement evaluation of \code{\var{self}[\var{i}:\var{j}]}. The returned object should be of the same type as \var{self}. Note that missing \var{i} or \var{j} in the slice expression are replaced @@ -1142,7 +1144,7 @@ If the instance does not implement the \method{__len__()} method, an No guarantee is made that indexes adjusted this way are not still negative. Indexes which are greater than the length of the sequence are not modified. -This method is deprecated. If no \method{__getslice__()} is found, a slice +If no \method{__getslice__()} is found, a slice object is created instead, and passed to \method{__getitem__()} instead. \end{methoddesc} |