Skip to content

"Built-in Types" page is too long #126052

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

Open
barneygale opened this issue Oct 27, 2024 · 3 comments
Open

"Built-in Types" page is too long #126052

barneygale opened this issue Oct 27, 2024 · 3 comments
Labels
docs Documentation in the Doc dir

Comments

@barneygale
Copy link
Contributor

barneygale commented Oct 27, 2024

Documentation

The Built-in Types document is very long, and as a result it basically never shows up in search engine results, because 90% of the page is considered irrelevant for any query like "python strings".

I suggest we split it up by top-level topic, e.g. we add a dedicated page for "Text Sequence Type — str"

See also #126053

@barneygale barneygale added the docs Documentation in the Doc dir label Oct 27, 2024
@ncoghlan
Copy link
Contributor

See #126053 for discussion of the link instability this introduces for deep links that include anchor tags, and potential mitigation strategies (we don't want to have the same discussion in two places).

@ncoghlan
Copy link
Contributor

ncoghlan commented Oct 30, 2024

The existing sections in this page would provide a reasonable break down across multiples pages (subsection moves noted in the list). Top level bullet points would be separate pages (retaining the current top level landing page as an overview page, including its navigation table):

@JelleZijlstra
Copy link
Member

I would aim towards giving each (major?) builtin type its own page, so it's easy for users to know "if I want to know how set works, I can go to docs.python.org/.../set.html".

A few sections, e.g. https://docs.python.org/3/library/stdtypes.html#context-manager-types belong in the data model page (which may also be split up). In my mind, stdtypes is part of the library docs and should cover specific concrete types; datamodel is part of the language reference and should cover the magic methods that the Python interpreter itself may implicitly call.

I feel that internal types that are exposed in the types module are best documented in the types module docs, so I would move discussion of code objects etc. into types.

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
Projects
Status: Todo
Development

No branches or pull requests

3 participants