From: Filipe Laíns Date: Tue, 19 Oct 2021 18:18:50 +0000 (+0100) Subject: bpo-45449: add note about PEP 585 in collections.abc's documentation (GH-29047) X-Git-Tag: v3.11.0a2~153 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7bafa0cf586227987d3d662264d491e3780024b7;p=thirdparty%2FPython%2Fcpython.git bpo-45449: add note about PEP 585 in collections.abc's documentation (GH-29047) Signed-off-by: Filipe Laíns Co-authored-by: Łukasz Langa --- diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst index 07df1873bba5..132b0ce7192a 100644 --- a/Doc/library/collections.abc.rst +++ b/Doc/library/collections.abc.rst @@ -104,6 +104,9 @@ example, knowing that a class supplies ``__getitem__``, ``__len__``, and ``__iter__`` is insufficient for distinguishing a :class:`Sequence` from a :class:`Mapping`. +.. versionadded:: 3.9 + These abstract classes now support ``[]``. See :ref:`types-genericalias` + and :pep:`585`. .. _collections-abstract-base-classes: diff --git a/Misc/NEWS.d/next/Documentation/2021-10-19-01-41-40.bpo-45449.fjHZJc.rst b/Misc/NEWS.d/next/Documentation/2021-10-19-01-41-40.bpo-45449.fjHZJc.rst new file mode 100644 index 000000000000..fb817757a148 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2021-10-19-01-41-40.bpo-45449.fjHZJc.rst @@ -0,0 +1 @@ +Add note about :pep:`585` in :mod:`collections.abc`.