Skip to content
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

Can't find "map" with search on docs.python.org #89541

Closed
gvanrossum opened this issue Oct 5, 2021 · 6 comments
Closed

Can't find "map" with search on docs.python.org #89541

gvanrossum opened this issue Oct 5, 2021 · 6 comments
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@gvanrossum
Copy link
Member

BPO 45378
Nosy @gvanrossum, @rhettinger, @terryjreedy, @raulcd

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:

assignee = None
closed_at = None
created_at = <Date 2021-10-05.15:51:22.634>
labels = ['type-bug', 'docs']
title = 'Can\'t find "map" with search on docs.python.org'
updated_at = <Date 2021-10-08.21:32:49.445>
user = 'https://github.com/gvanrossum'

bugs.python.org fields:

activity = <Date 2021-10-08.21:32:49.445>
actor = 'terry.reedy'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2021-10-05.15:51:22.634>
creator = 'gvanrossum'
dependencies = []
files = []
hgrepos = []
issue_num = 45378
keywords = []
message_count = 4.0
messages = ['403245', '403251', '403254', '403509']
nosy_count = 5.0
nosy_names = ['gvanrossum', 'rhettinger', 'terry.reedy', 'docs@python', 'raulcd']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue45378'
versions = []

@gvanrossum
Copy link
Member Author

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).

@gvanrossum gvanrossum added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error labels Oct 5, 2021
@gvanrossum gvanrossum added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error labels Oct 5, 2021
@rhettinger
Copy link
Contributor

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".

@gvanrossum
Copy link
Member Author

I'm surprised no one else noticed this until now.

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.)

@terryjreedy
Copy link
Member

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.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@CAM-Gerlach
Copy link
Member

See also #60075 and #87780

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?

@gvanrossum
Copy link
Member Author

The builtin map function is now the 5th hit when searching the 3.11 docs for "map". I think that's good enough.

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 type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

4 participants