Skip to content

warnings.catch_warnings docs: dubious mention of sys.stdout #129846

@jwilk

Description

@jwilk

https://docs.python.org/3/library/warnings.html#warnings.catch_warnings reads:

If record is True, a list is returned that is progressively populated with objects as seen by a custom showwarning() function (which also suppresses output to sys.stdout).

Was it meant to say sys.stderr instead?
Otherwise, I don't understand why it mentions stdout specifically. I don't see anything about stdout elsewhere in the module docs or in the implementation.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions