I'm sorry if this has already been reported. I'm sure it's very low on any list of priorities but it should be an easy one.
I noticed that when doing a Google search for "python built in functions" I am presented with two official results:
docker run -it --rm python:3.11
Python 3.11.10 (main, Oct 19 2024, 04:02:01) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> range(1, 1, step=1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: range() takes no keyword arguments
I'm sorry if this has already been reported. I'm sure it's very low on any list of priorities but it should be an easy one.
I noticed that when doing a Google search for "python built in functions" I am presented with two official results:
On the
functionspage, clicking onrangetakes you to https://docs.python.org/3/library/functions.html#func-range . It looks like, as of 3.11, range acceptsstepas a kwarg. This is inconsistent with thestdtypespage which showsstepas an optional, positional arg through 3.13.functions:
stdtypes:
source:
I didn't see any mention of this change in What’s New In Python 3.11 and it surprised me that a built-in would be changed in such a way.
I pulled a 3.11 docker image and it would seem
stepis not a kwarg.tl;dr - The
functionspage incorrectly states that therangefunction acceptsstepas a kwarg.Linked PRs
range()#125945