diff options
author | Raymond Hettinger <python@rcn.com> | 2015-05-23 02:29:22 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2015-05-23 02:29:22 (GMT) |
commit | ec219ba1c04c4514b8b004239b1a0eac914dde4a (patch) | |
tree | 30abd24e56cc7faec9bb332728253c4a58f57e91 /Doc/library/collections.abc.rst | |
parent | 256613c605bf207ed77616c04563275cfbaf3ee4 (diff) | |
download | cpython-ec219ba1c04c4514b8b004239b1a0eac914dde4a.zip cpython-ec219ba1c04c4514b8b004239b1a0eac914dde4a.tar.gz cpython-ec219ba1c04c4514b8b004239b1a0eac914dde4a.tar.bz2 |
Issue #23086: Add start and stop arguments to the Sequence.index() mixin method.
Diffstat (limited to 'Doc/library/collections.abc.rst')
-rw-r--r-- | Doc/library/collections.abc.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst index 28ba430..0039bb2 100644 --- a/Doc/library/collections.abc.rst +++ b/Doc/library/collections.abc.rst @@ -121,6 +121,20 @@ ABC Inherits from Abstract Methods Mixin ABCs for read-only and mutable :term:`sequences <sequence>`. + Implementation note: Some of the mixin methods, such as + :meth:`__iter__`, :meth:`__reversed__` and :meth:`index`, make + repeated calls to the underlying :meth:`__getitem__` method. + Consequently, if :meth:`__getitem__` is implemented with constant + access speed, the mixin methods will have linear performance; + however, if the underlying method is linear (as it would be with a + linked list), the mixins will have quadratic performance and will + likely need to be overridden. + + .. versionchanged:: 3.5 + The index() method added support for *stop* and *start* + arguments. + + .. class:: Set MutableSet |