summaryrefslogtreecommitdiffstats
path: root/Doc/library/functions.rst
diff options
context:
space:
mode:
authorFurkan Onder <furkanonder@protonmail.com>2023-02-19 00:22:02 (GMT)
committerGitHub <noreply@github.com>2023-02-19 00:22:02 (GMT)
commit61f1e67c6fcbf80eb9be2b75f7d62954e28c89e6 (patch)
tree74e32f1ed356fa4cb6cf6013c2cf2aca10046ff3 /Doc/library/functions.rst
parent5170caf3059fdacc92d7370eecb9fe4f0c5a1c76 (diff)
downloadcpython-61f1e67c6fcbf80eb9be2b75f7d62954e28c89e6.zip
cpython-61f1e67c6fcbf80eb9be2b75f7d62954e28c89e6.tar.gz
cpython-61f1e67c6fcbf80eb9be2b75f7d62954e28c89e6.tar.bz2
GH-84783: Make the slice object hashable (GH-101264)
Diffstat (limited to 'Doc/library/functions.rst')
-rw-r--r--Doc/library/functions.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 658d676..3ff2884 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -1635,6 +1635,9 @@ are always available. They are listed here in alphabetical order.
example: ``a[start:stop:step]`` or ``a[start:stop, i]``. See
:func:`itertools.islice` for an alternate version that returns an iterator.
+ .. versionchanged:: 3.12
+ Slice objects are now :term:`hashable` (provided :attr:`~slice.start`,
+ :attr:`~slice.stop`, and :attr:`~slice.step` are hashable).
.. function:: sorted(iterable, /, *, key=None, reverse=False)