Skip to content

Links to PEP 585 in Generic types #140121

Description

@Gobot1234

Documentation

Currently a lot of places refer to PEP 585, this is not recommend as the PEP is not a living documentation and isn't updated any more.

Happy to do update this myself

Activity

  1. AA-Turner commented on Oct 14, 2025

    @AA-Turner
    Member

    What's the substantive proposed change?

    A

  2. Gobot1234 commented on Oct 14, 2025

    @Gobot1234
    ContributorAuthor

    Going through and find and replacing everything that says "See PEP 585" with a link to more recent documentation on the subject. Coming from #128336 (comment)

  3. changed the title [-]Links PEP 585 in Generic types[/-] [+]Links to PEP 585 in Generic types[/+] on Oct 14, 2025
  4. Sachaa-Thanasius commented on Oct 14, 2025

    @Sachaa-Thanasius
    Contributor

    Personally not the biggest fan of a docstring just being a link, even if it's a link to something comprehensive. Might it make sense to start the docstring with a short sentence explaining that the method allows the class to be subscripted for use as a parameterized generic, or something along those lines? It doesn't have to be a detailed explanation, but at least it won't be nothing. Just a thought.

  5. AA-Turner commented on Oct 15, 2025

    @AA-Turner
    Member

    Yes, we shouldn't put links in docstrings. Whilst 'See PEP 585' isn't self-documenting, it is a reference to an effectively immutable document/concept.

    Note also that PEP 585 redirects the reader to the relevant d.p.o documentation.

    If we change the docstrings here, it should be to something both brief and that doesn't rely on external references (though saying words to the effect of 'see PEP 585' is fine, we should just avoid hyperlinks).

    A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions