PEP 767: Address feedback & open issues#4559
Merged
JelleZijlstra merged 11 commits intopython:mainfrom Mar 11, 2026
Merged
Conversation
Clarify that bare `ReadOnly` is not allowed, and add that to rejected ideas Specify that `type[Protocol]` does not inherit the protocol's attributes Close issue: "Extending Initialization" Bikeshed on some wording Use my real name
carljm
approved these changes
Aug 28, 2025
hugovk
reviewed
Feb 24, 2026
Member
hugovk
left a comment
There was a problem hiding this comment.
Where are we up to with this PR? Can we merge it? Let's do so if there's no further feedback in ~a week.
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This reverts commit 11f4522.
"Terminology" section allow initializing read-only attributes by subclass allow `@classmethod` to initialize instance attributes allow `ReadOnly` + `Final`, though redundant
carljm
reviewed
Mar 3, 2026
Improve init rules regarding `__new__` and classmethods Address Carl's comments
carljm
reviewed
Mar 9, 2026
Member
carljm
left a comment
There was a problem hiding this comment.
This is looking pretty good to me! A few thoughts after another read-through.
Clarify that inheriting from a protocol makes it behave like a nominal class (wrt ReadOnly)
carljm
approved these changes
Mar 11, 2026
Member
|
@hugovk not sure if the protocol here is for me as sponsor to just merge, or to get another once-over from a PEP editor? I'm happy for this to go in. |
Member
|
It's fine to just merge it! If you don't mind I'll read through it too though. |
JelleZijlstra
approved these changes
Mar 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ReadOnlyis not allowed, and added that to rejected ideastype[Protocol])📚 Documentation preview 📚: https://pep-previews--4559.org.readthedocs.build/