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

NamedTuple subclassing NamedTuple #427

Closed
Assignees
ilevkivskyi
Labels
resolution: wontfixA valid issue that most likely won't be resolved for reasons described in the issue
@gvanrossum

Description

@gvanrossum

I naively thought that since I can write

classA(NamedTuple):x:inty:int

I would also be able to subclass this:

classB(A):z:int

That is accepted syntactically and at runtime but no new__new__ method is generated so callingB(1, 2, 3) is flagged as an error (too many arguments) by both mypy and runtime.

Metadata

Metadata

Assignees

Labels

resolution: wontfixA valid issue that most likely won't be resolved for reasons described in the issue

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp