Skip to content

Conversation

@iFreilicht
Copy link
Contributor

Before, overriding update in a UserDict (or anything else inheriting from MutableMapping) without the type-checker complaining was impossible, because the overloads had different requirements for self (positional-only vs. positional or keyword argument) that could not be fulfilled by a single function implementation.

Fixes #15310

Before, overriding this function without the type-checker complaining was impossible, because the overloads hat different requirements for self (positional-only vs. positional or keyword) that could not be fulfilled by a single function implementation.

Fixes python#15310
@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@AlexWaygood AlexWaygood merged commit 84c2067 into python:main Jan 24, 2026
63 checks passed
@iFreilicht iFreilicht deleted the patch-1 branch January 24, 2026 22:57
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.

Current definition of MutableMapping.update makes it impossible to override update in a UserDict

2 participants