Skip to content

Incorrect subchapter title for range object #132452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
IvanKirpichnikov opened this issue Apr 12, 2025 · 7 comments
Closed

Incorrect subchapter title for range object #132452

IvanKirpichnikov opened this issue Apr 12, 2025 · 7 comments
Labels
docs Documentation in the Doc dir pending The issue will be closed if no feedback is provided

Comments

@IvanKirpichnikov
Copy link
Contributor

IvanKirpichnikov commented Apr 12, 2025

Documentation

The definition of range - function is incorrect. here
In fact, range is a class. Proof

@IvanKirpichnikov IvanKirpichnikov added the docs Documentation in the Doc dir label Apr 12, 2025
@brianschubert
Copy link
Contributor

Are you referring to section from the tutorial: https://docs.python.org/3/tutorial/controlflow.html#the-range-function ?

If so, I agree the wording could be cleaned up. Similar changes have been made in the past, e.g. #81611

@IvanKirpichnikov
Copy link
Contributor Author

Yes, I mean him. I forgot to leave a link

@IvanKirpichnikov
Copy link
Contributor Author

in that case can i send a pull request with a fix? if so, won't that break the links to this article?

@picnixz
Copy link
Member

picnixz commented Apr 12, 2025

in that case can i send a pull request with a fix? if so, won't that break the links to this article?

Yes, it will. But we can make a phantom section for that if needed using Sphinx labels. There will be two anchors but not necessarily linking to the same exact HTML node.

@sobolevn
Copy link
Member

There are several classes in stdlib that are documented as functions. Like map, range, etc. This is done on purpose, because that's an API we want to support.

@picnixz
Copy link
Member

picnixz commented Apr 12, 2025

Oh, then maybe it's fine to keep them as is. One could also say that the fact that map is a class is an implementation detail.

@picnixz picnixz added the pending The issue will be closed if no feedback is provided label Apr 12, 2025
@sobolevn
Copy link
Member

I agree, there should be a solid reason to change this.

@sobolevn sobolevn closed this as not planned Won't fix, can't repro, duplicate, stale Apr 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir pending The issue will be closed if no feedback is provided
Projects
Status: Todo
Development

No branches or pull requests

4 participants