Skip to content

Conversation

@VanshAgarwal24036
Copy link

This PR fixes incorrect ParamSpec default examples in the ParamSpec
docstring shown by help(ParamSpec).

According to the typing specification, ParamSpec defaults must be a list
literal, ellipsis (...), or another ParamSpec. Tuples are not permitted.

The docstring examples previously used tuple defaults. These are updated
to use list defaults to match the typing specification and the existing
documentation.

Closes: gh-143089

@bedevere-app
Copy link

bedevere-app bot commented Dec 25, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@python-cla-bot
Copy link

python-cla-bot bot commented Dec 25, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's another case of default=() in test_paramspec, please fix it as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No news entry is required for this change, please remove it.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The docstring of ParamSpec should show two examples with a list instead of a tuple

3 participants