diff options
author | Guido van Rossum <guido@dropbox.com> | 2016-08-18 16:22:23 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@dropbox.com> | 2016-08-18 16:22:23 (GMT) |
commit | 97c1adf3935234da716d3289b85f72dcd67e90c2 (patch) | |
tree | 0af6f9f258cf26ee9e59db463cc89d04c45bc0b8 /Doc/library/collections.abc.rst | |
parent | 0a6996d87d19a524c2a11dd315d96d12083c47d4 (diff) | |
download | cpython-97c1adf3935234da716d3289b85f72dcd67e90c2.zip cpython-97c1adf3935234da716d3289b85f72dcd67e90c2.tar.gz cpython-97c1adf3935234da716d3289b85f72dcd67e90c2.tar.bz2 |
Anti-registration of various ABC methods.
- Issue #25958: Support "anti-registration" of special methods from
various ABCs, like __hash__, __iter__ or __len__. All these (and
several more) can be set to None in an implementation class and the
behavior will be as if the method is not defined at all.
(Previously, this mechanism existed only for __hash__, to make
mutable classes unhashable.) Code contributed by Andrew Barnert and
Ivan Levkivskyi.
Diffstat (limited to 'Doc/library/collections.abc.rst')
-rw-r--r-- | Doc/library/collections.abc.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst index 3914956..6463cea 100644 --- a/Doc/library/collections.abc.rst +++ b/Doc/library/collections.abc.rst @@ -114,7 +114,8 @@ ABC Inherits from Abstract Methods Mixin .. class:: Reversible - ABC for classes that provide the :meth:`__reversed__` method. + ABC for iterable classes that also provide the :meth:`__reversed__` + method. .. versionadded:: 3.6 |