diff options
author | Furkan Onder <furkanonder@protonmail.com> | 2023-02-19 00:22:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-19 00:22:02 (GMT) |
commit | 61f1e67c6fcbf80eb9be2b75f7d62954e28c89e6 (patch) | |
tree | 74e32f1ed356fa4cb6cf6013c2cf2aca10046ff3 /Doc/library/functions.rst | |
parent | 5170caf3059fdacc92d7370eecb9fe4f0c5a1c76 (diff) | |
download | cpython-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.rst | 3 |
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) |