Skip to content
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

Change int to Any in unpacking unbounded tuple types #1855

Merged
merged 1 commit into from
Mar 17, 2025

Conversation

denisborisov
Copy link
Contributor

It looks like there should be Any instead of int, because the documentation says the following:
"""
We can also pass a *tuple[int, ...] wherever a *Ts is expected. This is useful when we have particularly dynamic code and cannot state the precise number of dimensions or the precise types for each of the dimensions.
"""

Copy link

cpython-cla-bot bot commented Sep 16, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@srittau
Copy link
Collaborator

srittau commented Mar 17, 2025

Thanks, this seems to be a remnant from PEP 646 (https://peps.python.org/pep-0646/#unpacking-unbounded-tuple-types) where Tuple[int, ...] as used in the section as an example.

@srittau srittau added the topic: typing spec For improving the typing spec label Mar 17, 2025
@srittau srittau merged commit a01c536 into python:main Mar 17, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: typing spec For improving the typing spec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants