@@ -3142,17 +3142,20 @@ objects. The :mod:`collections.abc` module provides a
3142
3142
:term: `abstract base class ` to help create those methods from a base set of
3143
3143
:meth: `~object.__getitem__ `, :meth: `~object.__setitem__ `,
3144
3144
:meth: `~object.__delitem__ `, and :meth: `!keys `.
3145
- Mutable sequences should provide methods :meth: `~sequence.append `,
3146
- :meth: `~sequence.count `, :meth: `~sequence.index `, :meth: `~sequence.extend `,
3147
- :meth: `~sequence.insert `, :meth: `~sequence.pop `, :meth: `~sequence.remove `,
3148
- :meth: `~sequence.reverse ` and :meth: `!sort `,
3145
+
3146
+ Mutable sequences should provide methods
3147
+ :meth: `~sequence.append `, :meth: `~sequence.clear `, :meth: `~sequence.count `,
3148
+ :meth: `~sequence.extend `, :meth: `~sequence.index `, :meth: `~sequence.insert `,
3149
+ :meth: `~sequence.pop `, :meth: `~sequence.remove `, and :meth: `~sequence.reverse `,
3149
3150
like Python standard :class: `list ` objects.
3150
3151
Finally, sequence types should implement addition (meaning concatenation) and
3151
3152
multiplication (meaning repetition) by defining the methods
3152
3153
:meth: `~object.__add__ `, :meth: `~object.__radd__ `, :meth: `~object.__iadd__ `,
3153
3154
:meth: `~object.__mul__ `, :meth: `~object.__rmul__ ` and :meth: `~object.__imul__ `
3154
3155
described below; they should not define other numerical
3155
- operators. It is recommended that both mappings and sequences implement the
3156
+ operators.
3157
+
3158
+ It is recommended that both mappings and sequences implement the
3156
3159
:meth: `~object.__contains__ ` method to allow efficient use of the ``in ``
3157
3160
operator; for
3158
3161
mappings, ``in `` should search the mapping's keys; for sequences, it should
0 commit comments