-
-
Notifications
You must be signed in to change notification settings - Fork 32k
Can't find "map" with search on docs.python.org #89541
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
Comments
I was looking for the docs for 'map' and tried to use the search box on docs.python.org. This gave a lot of things whose name started with or contained 'map', but the entry for the builtin map() function was hidden really far down under the heading "Builtin Functions" (https://docs.python.org/3.10/library/functions.html?highlight=map) rather than deep-linking to the entry I was looking for (https://docs.python.org/3.10/library/functions.html#map). I'm sure that some tweak to the index builder could fix this, in general, for all builtin functions and types (many of which I imagine suffer from the effect -- having a short name that is used a lot as a part of other names). |
I'm surprised no one else noticed this until now. The doc search finds some entries such as: "sum", "min", "max", and "enumerate". However, it is missing others such as: "map" and "filter". |
Most people probably just use Google and read whatever comes up. I was looking whether the official docs for map mentioned that map is actually an iterator class. (They don't.) |
The iterator classes are not identified as such because being a class instead of a function, such as a generator function, is a CPython implementation detail, not a language requirement. Searching for filter seems as bad -- builtin filter is about the 60th hit. Builtins should be listed first instead. |
Seems like this has been mostly fixed in the 3.11 docs, most likely due to the Sphinx version bump in that version (since I didn't spot a clear source change); builtins are now all (at least in my tests of the ones here and a few others) indexed reliably; they are not listed at the very top (which Sphinx prioritizing exact and unqualified matches, as mentioned in #60075 and on the docs community, would improve) but they are at least in the first few spots (for the examples above) rather than 60th or missing. @JulienPalard , is there a chance that I can backport the Sphinx version bump to 3.10 to versions consistent with 3.11/3.12 so we can pick these fixes and those discussed on several other docs issues? |
The builtin |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: