Skip to content

Improve styling of repl blocks in pydoc's HTML output #160998

Open

Description

@StanFromIreland

Many docstrings contain repl-based examples, for example turtle. In the documentation, it renders as a code block, like so:

Image

However, in pydoc the example does not have any special styling, and as such renders like plain text:

Image

I propose to add a little styling, so it is rendered like a distinct code block, for example:

Image

Adding colour is a possible follow-up.

Linked PRs

Activity

  1. added
    type-featureA feature request or enhancement
    stdlibStandard Library Python modules in the Lib/ directory
    on Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ Proxy