summaryrefslogtreecommitdiffstats
path: root/Doc/library/2to3.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-11-16 07:16:24 (GMT)
committerGitHub <noreply@github.com>2017-11-16 07:16:24 (GMT)
commit0a2abdfca2495291809855cf7dfc6721c9c962e3 (patch)
tree7eabd56d628252e631bc5f44dc9e4e78bd764945 /Doc/library/2to3.rst
parenta7368ac6360246b1ef7f8f152963c2362d272183 (diff)
downloadcpython-0a2abdfca2495291809855cf7dfc6721c9c962e3.zip
cpython-0a2abdfca2495291809855cf7dfc6721c9c962e3.tar.gz
cpython-0a2abdfca2495291809855cf7dfc6721c9c962e3.tar.bz2
bpo-30143: 2to3 now generates a code that uses abstract collection classes (#1262)
from collections.abc rather than collections.
Diffstat (limited to 'Doc/library/2to3.rst')
-rw-r--r--Doc/library/2to3.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/library/2to3.rst b/Doc/library/2to3.rst
index 1ab05a6..faf06d9 100644
--- a/Doc/library/2to3.rst
+++ b/Doc/library/2to3.rst
@@ -345,20 +345,20 @@ and off individually. They are described here in more detail.
Converts calls to various functions in the :mod:`operator` module to other,
but equivalent, function calls. When needed, the appropriate ``import``
- statements are added, e.g. ``import collections``. The following mapping
+ statements are added, e.g. ``import collections.abc``. The following mapping
are made:
- ================================== ==========================================
+ ================================== =============================================
From To
- ================================== ==========================================
+ ================================== =============================================
``operator.isCallable(obj)`` ``hasattr(obj, '__call__')``
``operator.sequenceIncludes(obj)`` ``operator.contains(obj)``
- ``operator.isSequenceType(obj)`` ``isinstance(obj, collections.Sequence)``
- ``operator.isMappingType(obj)`` ``isinstance(obj, collections.Mapping)``
+ ``operator.isSequenceType(obj)`` ``isinstance(obj, collections.abc.Sequence)``
+ ``operator.isMappingType(obj)`` ``isinstance(obj, collections.abc.Mapping)``
``operator.isNumberType(obj)`` ``isinstance(obj, numbers.Number)``
``operator.repeat(obj, n)`` ``operator.mul(obj, n)``
``operator.irepeat(obj, n)`` ``operator.imul(obj, n)``
- ================================== ==========================================
+ ================================== =============================================
.. 2to3fixer:: paren