You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Signature of slice is documented incorrectly #107755
This was changed from slice(start, stop[, step]) in #96579. That default for step is incorrect. It's correct in a range, but in a slice it actually defaults to None:
>>> slice(1,2).step is None
True
Most code handle step=1 and step=None the same way when receiving a slice, but user defined types implementing __getitem__/__setitem__/__delitem__ aren't obliged to, and the correct default should be documented.
Activity
Document the correct default value of slice step. Closes python#107755
Document the correct default value of slice step. Closes python#107755
gh-107755: Document the correct default value of slice step (GH-107756)
pythongh-107755: Document the correct default value of slice step (py…
pythongh-107755: Document the correct default value of slice step (py…
[3.11] gh-107755: Document the correct default value of slice step (G…
[3.12] gh-107755: Document the correct default value of slice step (G…