Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TypeVarTuple and ParamSpec don't work together #99344

Closed
Assignees
serhiy-storchaka
Labels
3.11only security fixes3.12only security fixesstdlibStandard Library Python modules in the Lib/ directorytopic-typingtype-bugAn unexpected behavior, bug, or error
@LeeeeT

Description

@LeeeeT

Bug report

The following code gives me an error:

fromtypingimportGeneric,TypeVarTuple,ParamSpecTs=TypeVarTuple("Ts")P=ParamSpec("P")classFoo(Generic[*Ts,P]):passFoo[int,str, [bytes]]
TypeError: Too many arguments for <class 'Foo'>; actual 3, expected 2

I don't see any reasons why it doesn't work withParamSpec. I believe it should assignint, str toTs and[bytes] toP.

Environment

  • CPython versions tested on: 3.11
  • Operating system and architecture: Linux x86_64

Metadata

Metadata

Labels

3.11only security fixes3.12only security fixesstdlibStandard Library Python modules in the Lib/ directorytopic-typingtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp