mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
GH-84783: Make the slice object hashable (GH-101264)
This commit is contained in:
parent
5170caf305
commit
61f1e67c6f
7 changed files with 53 additions and 12 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue