Skip to content

Avoid various NamedTuples#21326

Merged
hauntsaninja merged 1 commit intopython:masterfrom
hauntsaninja:rmnamedtuple
Apr 25, 2026
Merged

Avoid various NamedTuples#21326
hauntsaninja merged 1 commit intopython:masterfrom
hauntsaninja:rmnamedtuple

Conversation

@hauntsaninja
Copy link
Copy Markdown
Collaborator

Jukka mentioned these are slow to construct, so might as well get rid of them

Jukka mentioned these are slow to construct, so might as well get rid of
them
@github-actions
Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Copy link
Copy Markdown
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

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

Yeah, this is true. They are not crazy slow, but may give visible slow-down when used in hot code.

@hauntsaninja hauntsaninja merged commit 6d49fbf into python:master Apr 25, 2026
24 checks passed
@hauntsaninja hauntsaninja deleted the rmnamedtuple branch April 25, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants