Repository navigation
docs.python.org prioritises search horribly #86272
Description
Activity
I expect it simply uses sphinx and I don't know if sphinx's search is easily customisable but the experience is really terrible when looking for the doc of a specific thing, *especially* when that thing is or is related to a builtin, which I'd expect to be extremely common. Though I expect part of the issue might also be that builtin or ABC methods are not documented *as such*, they're just written as code in tables.
For instance if you search "append": https://docs.python.org/3/search.html?q=append
On my end, neither list nor MutableSequence appear anywhere on this page, even scrolling down.
Searching for "list": https://docs.python.org/3/search.html?q=list
The documentation for the builtin "list" object also doesn't appear on the page. "Data Structures"[0] and "built-in types"[1] appear below the fold and the former is genuinely useful but also very easy to miss (I had not actually noticed it before going back in order to get the various links and try to extensively describe the issue). Neither actually links to the
listbuiltin type though.Above the fold we find various "list" methods and classes from the stdlib as well as the PDB
listcomment, none of which seems like the best match for the query.And even Google doesn't help much there, most of the hits are for third-party documentation, and the one docs.python.org link is to the Data Structures page *of Python 2.7*.
[0] https://docs.python.org/3/tutorial/datastructures.html?highlight=list
[1] https://docs.python.org/3/library/stdtypes.html?highlight=list- added3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of life
on Oct 21, 2020 - addeddocsDocumentation in the Doc dirDocumentation in the Doc dirtype-featureA feature request or enhancementA feature request or enhancement3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of life
on Oct 21, 2020 - addeddocsDocumentation in the Doc dirDocumentation in the Doc dirtype-featureA feature request or enhancementA feature request or enhancement
on Oct 21, 2020 Can we add search box using DuckDuckGo?
https://duckduckgo.com/?q=site%3Adocs.python.org%2F3%2F+list+appendApparently it's at least a possibility on DDG's side (https://duckduckgo.com/search_box), don't know how easy it'd be to integrate in sphinx, or whether a hard dependency on an external search engine is acceptable / desirable.
To note, there have been significant improvements here; with recent Sphinx versions, the Python 3.11+ docs do show builtin functions and classes near the top of the search, and the docs also now have custom functionality that displays glossary entries highlighted at the top, for which there's one for
Listas well.This is closely related to #89541 and #60075 , which cover mostly similar ground so I was going to close it as a duplicate, but this issue brings up a unique point—even in the latest 3.12 docs,
appendstill doesn't show up (at least as a method of eitherListorMutableSequence), and indeed, none of the MutableSequence methods do, nor do the two methods (indexandcount) in the common sequence operations section on lists, tuples, etc. In fact, they aren't able to be directly referenced at all, either through internal or external links, since they are just rows in a table.While including
indexentries in the search (as they are indexed) would mostly solve the search discoverability problem, this is an upstream Sphinx issue ( sphinx-doc/sphinx#6692 ) and would need to be fixed there. Even if and when it is, it still means that these are not independently reference-able objects, and do not follow the standard, expected and easy to follow structure for describing the methods of a class, including those of most of the other collections documented on the same page.Therefore, it would seem to make sense to just solve the root issue by converting the method items currently listed in the mutable sequence operations table to actual
methodentities under an appropriate class.Ideally, they would be under the MutableSequence class on the collections.abc page (which would be linked under the list class, as the methods apply to all
MutableSequenceobjects and would allow cross-referencing them elsewhere as such. However, the other existing collection types on the latter page have their methods enumerated under the classes on that page whereas none of thecollection.abcs do, so it wouldn't make sense to do this forlist/tupleand not the rest (which is out of scope here, and could be considered separately later). Therefore, they can just be added underlist(andtuple) for now, which is also more searchable.- removed3.9 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.7 (EOL)end of lifeend of life
on Aug 31, 2025 Closing as duplicate of new bug, as it has a proposed patch attached.
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsTodo
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: