.. versionadded:: 3.4
-.. index:: pair: object; slice
-
-.. note::
-
- Slicing is done exclusively with the following three methods. A call like ::
-
- a[1:2] = b
-
- is translated to ::
-
- a[slice(1, 2, None)] = b
-
- and so forth. Missing slice items are always filled in with ``None``.
-
-
.. method:: object.__getitem__(self, subscript)
Called to implement *subscription*, that is, ``self[subscript]``.
should raise an :exc:`LookupError` or one of its subclasses
(:exc:`IndexError` for sequences; :exc:`KeyError` for mappings).
+ .. index:: pair: object; slice
+
+ .. note::
+
+ Slicing is handled by :meth:`!__getitem__`, :meth:`~object.__setitem__`,
+ and :meth:`~object.__delitem__`.
+ A call like ::
+
+ a[1:2] = b
+
+ is translated to ::
+
+ a[slice(1, 2, None)] = b
+
+ and so forth. Missing slice items are always filled in with ``None``.
+
.. note::
The sequence iteration protocol (used, for example, in :keyword:`for`